MCPcopy Create free account
hub / github.com/codecombat/codecombat / getCourseBundlePrice

Function getCourseBundlePrice

app/core/utils.js:868–878  ·  view source on GitHub ↗
(coursePrices, seats)

Source from the content-addressed store, hash-verified

866}
867
868const getCourseBundlePrice = function (coursePrices, seats) {
869 let pricePerSeat
870 if (seats == null) { seats = 20 }
871 const totalPricePerSeat = coursePrices.reduce((a, b) => a + b, 0)
872 if (coursePrices.length > 2) {
873 pricePerSeat = Math.round(totalPricePerSeat / 2.0)
874 } else {
875 pricePerSeat = parseInt(totalPricePerSeat)
876 }
877 return seats * pricePerSeat
878}
879
880const getCoursePraise = function () {
881 const praise = [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected