Cant get past step 1 in Functions


#1

Instructions: Start by writing a function named takeOrder . Inside of its block, use console.log to print 'Order: pizza' .

function takeOrder()
{console.log('Order: pizza')}

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

function getSubTotal(itemCount) {
 return itemCount * 7.5;
}

function getTax() {
 return getSubTotal(orderCount) * 0.06;
}

function getTotal() {
 return getSubTotal(orderCount) + getTax();
}

takeOrder('bacon', 'thin');
takeOrder('sardines', 'regular');
takeOrder('pepperoni', 'deep dish');

console.log(getSubTotal(orderCount));
console.log(getTotal());

The error I’m getting is ‘expected [Function’

What am I doing wrong?


#2

adding too much code in a lesson can give errors


#3

That code was already there when I started the lesson


#4

But I figured it out I just deleted all that code and input only what it asked. Its just weird that it started me off with all that code already.


#5

i don’t think that is suppose to be. Bit weird, that what you are asked to add is already there.