Return II


<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

expected [Function
expected [Function

It looks like the same code codeacademy suggests but it still doesn’t work. What am i missing?


var orderCount = 0

function takeOrder(topping, crustType) {
orderCount += 1
return orderCount

function getSubTotal(itemCount) {
return itemCount * 7.50

function getTax() {
return getSubTotal(itemCount) * 0.06;

takeOrder(‘pineapple’, ‘thin crust’)
takeOrder(‘apple’, ‘normal crust’)
takeOrder(‘cheese’, ‘thin crust’)



return getSubTotal(itemCount) * 0.06;

where does itemCount come from?what’s the value of itemCount? what do you need to pass as an argument for the getSubTotal function?


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.