Cant get past step 1 in Functions


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');


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

What am I doing wrong?


adding too much code in a lesson can give errors


That code was already there when I started the lesson


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.


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


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