Hello,

here i need something to be clear about the relation of orderCount and takeOrder.

in link above i found below code:

//

let orderCount= 0;

const takeOrder = (topping, crustType) => {

orderCount++;

console.log('Order: ’ + crustType + ’ pizza topped with ’ + topping);

};

const getSubTotal=(itemCount)=> {

return itemCount*7.5;

};

takeOrder(‘mushroom’, ‘thin crust’);

takeOrder(‘spinach’, ‘whole wheat’);

takeOrder(‘pepperoni’, ‘brooklyn style’);

console.log(getSubTotal(orderCount))

//

for loging the console of getSubTotal it returns itemCount which is 3 and multiply with 7.5.

Q.1 dose the itemCount represent the orderCount.

Q.2 if this, how the orderCount find out how many time i place takeOrder.

Q.3 What is the relation among the three thing of itemCount, orderCount and takeOrder, where i call getSubTotal(orderCount) and it returns total number of takeOrder * 7.5

answer will help me a lot.

thanks in advance.