Concatenating Strings with the Plus Equals Operator help!

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.";
myStr += "This is the second sentence.";

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/concatenating-strings-with-the-plus-equals-operator

Build myStr over several lines by concatenating these two strings: "This is the first sentence. " and "This is the second sentence." using the += operator. Use the += operator similar to how it is shown in the editor. Start by assigning the first string to myStr , then add on the second string.

Notice that there is a space at the end of the first sentence, that you don’t have. Computers are really picky about stuff like that. Part of being a web dev is getting good at paying attention to minute details.

When I fix that, your test passes for me.

2 Likes

thank you for your assistance