Basic JavaScript: Concatenating Strings with the Plus Equals Operator

Tell us what’s happening:
i couldn’t find out any prblem here… but why it’s not working?

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.1; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0.

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

Here is what’s wrong.

You are missing a period and you are also adding a space after sentence.

it’s still not working :frowning:

Can you share your code?

// 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.";

It looks like your double quotes are not real double quotes.

Make sure you are using this quotation. "

i did it as like as similar as the task … but still it’s not working … whatever thanks a lot dear … :slight_smile: am trying to find out

You need to have a space in the first string after period.

var myStr = “This is the first sentence.”;

I am literally having this same problem and i cant figure out how to fix it. I even went to the console on another page and did it. It worked on the console but for some reason on the codecamp module it won’t accept my values in quotes.

// 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.";