I got stuck at functions in 5th lesson return



Did you declare a variable named orderCount set equal to the number 0?

var orderCount = 0;

function takeOrder(topping, crustType) {
  console.log('Order: ' + crustType + ' crust topped with ' + topping);
  orderCount = orderCount + 1;

function getSubTotal(itemCount) {
  return itemCount * 7.5;

takeOrder('bacon', 'thin');
takeOrder('pepperoni', 'regular');
takeOrder('pesto', 'thin');



Works fine in CodePen


but why still am getting same error, i don't know and i got the same result as you got . thanks for helping me.


i have the same problem


Try using different browser. People usually have problems with Firefox.


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