Appending Variables to Strings wont work

Tell us what’s happening:

Your code so far

// Example
var anAdjective = "awesome!";
var ourStr = "freeCodeCamp is ";
ourStr += anAdjective;

// Only change code below this line

var someAdjective = "wonderful";
var myStr = "Learning to code is ";
myStr += "someAdjective";

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36.

Link to the challenge:

So you’re appending the WORD “someAdjective” to your string, not the VARIABLE someAdjective. Do you see a difference in the way you add that variable from the way the sample shows? Hint: look at the quote marks.

1 Like

When you have troubles, you could try debugging using console.log(). For example in your case try adding this line at the end of your code to see why the code is not passing (it will be covered better in future challenges, but it is really useful)


1 Like