Functions 6 return II

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(‘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(){

Okay, I will give you a clue. For instance, here,

You have already created this function, and you want to log it to the console, using orderCount as the argument. You shouldn’t repeat that function definition.

You could instead do this:


I hope I helped! :wink:

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