HELP, "Get Code" won't even help


#1


https://www.codecademy.com/courses/learn-javascript/lessons/functions/exercises/return?action=lesson_resume


I am having trouble figuring out what I'm doing wrong. it was right when I completes the tasks undeneath but once I have finished everything in this subchapter it had told me the first task is incorrect. Even the "get code" won't help. It is exactly what I had and it still says " 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');

console.log(getSubTotal(orderCount));


#2

If I was told a variable wasn't holding what it should, then I would consider/find out what that variable refers to by the end of my code


#3

You aree missing a getTotal function along with the function call,

var getTotal = function(){
  return getSubTotal + getTax;
};
console.log(getTotal());

#4

"1.
Now that we have the pizza orders, you want to add them up to find the cost of the pizzas for the check. Let's imagine that each pizza is $7.50, no matter the topping and crust type.

We will need to do three things to write this in JavaScript:

Create a variable to hold the number of pizzas ordered.
Whenever a pizza is ordered, add one to the number of pizzas ordered.
Take the total number of pizzas and multiply them by 7, since each pizza is $7.50.
Begin by creating a variable named orderCount set equal to 0 at the top of your code"

This is the instruction it gives me. I have "var orderCount = 0;" on the top of my code though.


#5

This problem was already asked here before, the exact one to this. This is the code that works in CodePen


#7

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