I have a problem with this code. It doesn’t show the subtotal, tax and the total.
Can you help me please?
var orderCount = 0;
function takeOrder(topping, crustType){
orderCount = orderCount + 1;
console.log('Order: '+ crustType + ’ crust pizza topped with ’ + topping );
function getSubtotal(itemCount){
return itemCount * 7.5;
}
function getTax(){
return getSubTotal* 0.06;
}
function getTotal(){
return getSubTotal+ getTax;
}
}
takeOrder(‘bacon’,‘thin’);
takeOrder(‘cheese’,‘regular’);
takeOrder(‘pepperoni’,‘thick’);
takeOrder(‘salami’, ‘regular’);
takeOrder(‘fish’, ‘thick’);
takeOrder(‘veggies’, ‘regular’);
console.log(function getSubtotal(orderCount){
return itemCount * 7.5;
});
console.log(function getTax(){
});
console.log(function getTotal(){
});