The console says i’ve done the exercise right, but that exercise is supposed to return a number (3) multiplied by a price (7.5), but it returns a 0.
What’s the problem in the code? and why does the console consider the exercise good?
let orderCount=0
const takeOrder=(orderCount= orderCount + 1, topping, crustType)=>{
console.log('Order: '+ crustType + ’ pizza topped with ’ + topping)
};
const getSubTotal=(itemCount)=>{
return (itemCount*7.5)
}
takeOrder(‘bacon’, ‘thin crust’)
takeOrder(‘potatoes’, ‘thick crust’)
takeOrder(‘mushrooms’, ‘thin crust’)
console.log(getSubTotal(orderCount))
<do not remove the three backticks above>