Return ||


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-javascript-functions/lessons/functions/exercises/return-ii?action=lesson_resume&course_redirect=introduction-to-javascript

I do believe the hint is wrong

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

```

var orderCount = 0;

const takeOrder = (topping, crustType) => {
console.log(Order: ${crustType} pizza topped with ${topping});
orderCount ++;
};

const getSubTotal = (itemCount) =>{
return itemCount*7.5;
};

const getTax = (orderCount) => {
return getSubTotal(orderCount)*0.06;
};

const getTotal = () => {
return getSubTotal(orderCount)+getTax(orderCount);
};

takeOrder(‘mushrooms’, ‘thin crust’);
takeOrder(‘pineapple’, ‘mozarella-filled crust’);
takeOrder(‘chilli’, ‘no crust’);

console.log(getSubTotal(orderCount));
console.log(getTotal());

This should work instead

<do not remove the three backticks above>

#2

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