How does itemCount know what to count? I understand the result, but am not clear where itemCount came from and how it knows what to count - thank you

So sorry - here is the code

let orderCount = 0;

const takeOrder = (topping, crustType) => {
console.log('Order: ’ + crustType + ’ pizza topped with ’ + topping);

takeOrder(‘mushroom’, ‘thin crust’);
takeOrder(‘spinach’, ‘whole wheat’);
takeOrder(‘pepperoni’, ‘brooklyn style’);

const getSubTotal = (itemCount) => {
return itemCount * 7.5;


Here is the url


No code? No exercise url? Please include code and preferable also exercise url, so we at least know what the code looks like (we don’t know all the exercises from the top of our head)

if i had to guess, i would say itemCount is a function parameter. Parameters are defined when you define a function, and parameter(s) get there value from argument(s) at function call.

parameters are placeholder until they get a value (from argument at function call)


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