Please guys check this codes out its not working: Concatenating Strings with the Plus Equals Operator

Tell us what’s happening:

Your code so far

// Example
var ourStr = "I come first. ";
ourStr += "I come second.";

// Only change code below this line
var myStr = "This is the first sentence. ";
var myStr += "This is the first sentence.";

Your browser information:

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

Link to the challenge:

Hi @cassyjay!

You have a syntax error in your code because you have the same variable declared twice, sort of. The second declaration is causing the error because of the +=. If you compare your code to the example code provided, you’ll see what I mean. :mag:

Thank you, I don’t why am messing up easily. thank you.

@cassyjay You’re welcome. Messing up is part of learning! All of us do it. I’ve looked at some code over and over for hours only to realize I missed a comma, quotation mark, or some other minor syntax. :sunny:

Hmmmmm, it’s pretty annoying and frustrating at time. :sweat_smile::sweat_smile:

1 Like