myStr should have a value of the string This is the first sentence. This is the second sentence. // tests completed

Tell us what’s happening:

Your code so far


// Only change code below this line
var ourStr = "I come first. ";
ourStr += "I come Second.";
var myStr = "This is the first sentence. ";
myStr += " This is the second sentence."; 

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36.

Challenge: Concatenating Strings with the Plus Equals Operator

Link to the challenge:

Welcome, Arpit.

For future posts, please use a descriptive title about the topic, and include any questions/information in the Tell us what’s happening section.


It appears you have copied the example code into the editor. This will be useful for debugging, but is not required.

Add this to the bottom of your script to get an idea of why the test is failing:

console.log(ourStr);
console.log(myStr);

Hint:

Pay close attention to the spacing…

Hope this helps

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