What is wrong with this code?


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) {


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


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