Excercise 4/10 Parameters II

So the excercise says I did everything right, but I can’t get the output to say the value of the crustType parameter:

Tried changing the code in multiple ways that I thought should work, but well you probably guessed it…
Someone here who is willing to help me?


inside of your console.log(), crustType is in yellow. It should be in orange, like topping.

As it is, crustType is part of a string, and isn’t considered as a parameter.

1 Like

So I tried fixing that by typing:
console.log(‘Order:’ + crustType + ‘pizza topped with’ + topping);

Made the crustType orange so I figured this would be correct. Yet this was what gave the error in the console.

Now I got a instruction error in a later on excersices. Couldn’t quite figure it out so I pressed the ‘get code’ button and now I got:
console.log('Order: ’ + crustType + 'pizza topped with ’ + topping);

Only difference with my code is an extra whitespace between Order: and ', and between with and '. So did I have to include the whitespace or ???

1 Like

I’m afraid… yes, you did.

Codecademy can be… not very lenient. But the output also has to make sense.

If the exercise asks of you to output “Order: cheesy crust pizza topped with bacon”, it’s your job to output this exactly as requested.

I know it can be frustrating at times, but try focusing on the little details. After all, in this field of work, you’ll need that.

Keep at it and good luck!

1 Like

Thanks for the help! Much appreciated!
But I see that it switches between using a whitespace and not using a whitespace like here:
console.log('The temperature is ’ + getFahrenheit(15) + ‘°F’);

So when is the use of whitespace correct, and when not?

1 Like


It depends on the instructions really. Outside of Codecademy, you’ll be free to output things as you please, white space or not. In this case I guess they expect you to output “The temperature is 15°F” because why not. It might have been 15 °F. That makes no difference, they just want you to write it as instructed.

You’ll get used to it :wink:

What I’m really saying is, don’t focus too much on this white space stuff (it’s not a coding issue). The exercise needs to find a match between the instruction and what you’ve written, in order to validate the exercise. Hence the trouble you’re having.

1 Like

Clear language!:wink:
Alway’s curious about the details! Probably why I started to like coding:p

1 Like

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