6.returnII pizza total



I have achieved the total after tax that I was supposed to but I do not get the pass, what am I doing wrong here?

var orderCount=0;
function getSubTotal(itemCount){
  return itemCount * 7.5;
function takeOrder(topping, crustType) {
  console.log('Order: ' + crustType +' pizza topped with ' + topping);
  orderCount = orderCount+1;
function getTax(){
  return getSubTotal(orderCount) * 0.06;
function getTotal(){
  return getSubTotal(orderCount) + getTax();
takeOrder('eyes', 'hand');
takeOrder('pepper', 'brick');
takeOrder('lamb', 'cardboard');



when should you pass an argument?

getTotal function has no parameter so we don't need any argument for it.


Brilliant! thank you. That makes a lot of sense now that I think of it


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