Functions Exercise 4, step 3


#1

https://www.codecademy.com/courses/learn-javascript/lessons/functions/exercises/parameters-ii?action=lesson_resume

Hi guys,

I’m stuck at exercise 4 step 3. The code is printing the way it’s supposed to. But it won’t let me continue. Can anybody tell me what i’m doing wrong here?



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

takeOrder('bacon' , 'thin');
takeOrder('mozarella' , 'thick');
takeOrder('pepperoni' , 'medium');



#2

takeOrder('bacon' , 'thin');

remove the space from both side of ,

so call the function like

takeOrder('bacon','thin');


#3

Hi @maroussia93,

Would you tell us what error it throws?

Maybe try delete the spaces between those arguments in function takeOrder, like this:

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

takeOrder('bacon','thin');
takeOrder('mozarella','thick');
takeOrder('pepperoni','medium');

The white spaces doesn’t matter in the real life context, but for the sake of the exercise, maybe it was looking for the exact match.

:slight_smile:


Edit: @rcodeman beat me to it. But yeah, that’s what we thought. :wink:


#4

you are right… :slight_smile:


#5

That was it, how simple! Thank you :slight_smile:


#6

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