I cannot see my mistake


at the end i have to call my function but for some reason I cannot formulate it right.

On the last line of your program, after the takeOrder function calls, call the getSubTotal function inside a console.log statement.
getSubTotal has a parameter that represents the amount of items ordered. Pass in the orderCount as an argument when making the function call.
this is the task

var orderCount = 0
function getSubTotal(itemCount){
  return itemCount*7.5
function takeOrder (topping, crustType, orderCount = orderCount + 1) {
  return "Order:"+ crustType + " pizza topped with " + topping
takeOrder("bacon", "thin crust")


This little bit is not a parameter/argument, so it doesn't go there.


You also shouldn't have the parenthesis right here, because orderCount is not a function.


Thank you! I tried it first without the parenthesis but when it didn't work out I tried everything possible to start working :smiley:
Thanks a lot again!


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