What is wrong with this code?


#1


The prompt says "Now it's time to calculate the subtotal of the pizzas. This is the perfect job for a function.

Declare a function named getSubTotal that has one parameter named itemCount."

I don't know why I keep getting an error message for this.


var orderCount = 0;
var bacon;
function takeOrder(topping, crustType) {
  return orderCount === orderCount+1;
  return('Order: '+crustType+' pizza topped with '+ topping);
}
function getSubtotal(itemCount) {
  
}
takeOrder('bacon','thin');
takeOrder('pepperoni','thick');
takeOrder('sausage','stuffed');


#2

Nevermind, I'm an idiot, total wasn't capitalized in getSubTotal


#3

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