Hey guys!
Why do I have to use the the itemCount parameter instead of the orderCount. For me it doesn’t make sense to use the itemCount parameter because I haven’t defined this parameter yet.
Thanks for the help!
var orderCount = 0;
function takeOrder (topping , crustType) {
console.log (“Order:“ +crustType+ “crust topped with“ +topping);
orderCount = orderCount + 1;
}
function getSubTotal (itemCount) {
** turn itemCount * 7.5;
}
takeOrder (“bacon“ , “thin“);
takeOrder (“peperoni“ , “regular“);
takeOrder (“pesto“ , “thin“);
console.log (getSubTotal (orderCount) );