How Do I Pass In An Argument?


#1


I am on Step 5 of the linked exercise and it says to pass in a variable, I have been trying for a while but can't figure it out.


var orderCount = 0; 
function getSubTotal(itemCount)

{return (itemCount * 7.5);}

function takeOrder(topping, crustType) {
  console.log('Order: ' + crustType + ' crust topped with ' + topping);
orderCount = orderCount + 1;
}

takeOrder('bacon', 'thin');
takeOrder('pepperoni', 'regular');
takeOrder('pesto', 'thin');
console.log(getSubTotal);
itemCount(3);


#2

Arguments to functions go between the parentheses when you call them


#3

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