Return II


#1

https://www.codecademy.com/courses/learn-javascript/lessons/functions/exercises/return-ii?action=lesson_resume&link_content_target=interstitial_lesson

<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’)

console.log(getSubTotal(orderCount));


#2

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?


#3

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