Console.log does not generate results


#1

RE: Intro to JavaScript lesion - #3 Learn Functions and Scope. End of Lesson
I grasp the logic in the lesson but I cannot seem to generate any output on the screen via the last two lines.

    var orderCount = 0;
function takeOrder(orderCount = orderCount + 1,topping, crustType) {
  console.log('Order: ' + crustType + ' crust topped with ' + topping);
}
function getSubTotal(itemCount) {
  return itemCount * 7.5;
}
function getTax(){
  return getSubTotal(orderCount) * 0.06;
}
function getTotal(){
  return getSubTotal(orderCount) + getTax();
}
takeOrder('bacon', 'thin');
takeOrder('pepperoni', 'regular');
takeOrder('pesto', 'thin');
console.log(getSubTotal(orderCount));
console.log(getTotal());

#2

It really shouldn't print anything because the syntax isn't quite valid


#3

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