Return 5/6


#1

Hello there I am stuck on part 5/6 on the Return section of Introduction to Functions. I don’t understand what this problem is asking me. Can someone please explain and show me what is wrong with my code?

var pizzaOrder = true
var orderCount = 0

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

if (pizzaOrder === true){
console.log (‘Order:’+ crustType + ’ pizza’ + topping + orderCount * 7.50)
}

}
takeOrder(‘thin crust’,’ topped with bacon ‘);
takeOrder(‘pepperoni’,’ seasoned crust ')
takeOrder(‘xtra cheese’, ’ cheese stuffed crust ')
console.log (getSubTotal)

function getSubTotal(itemCount)
{

return(itemCount * 7.50)
}

console.log (getSubTotal(orderCount))


#2

What makes you say that it’s wrong? What’s missing, where’s the difficulty? What’s your question(s)?


#3

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