HELP, "Get Code" won't even help

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-javascript/lessons/functions/exercises/return?action=lesson_resume

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
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));

<do not remove the three backticks above>

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

1 Like

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

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

"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.

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

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