Basic Javascript: how do i make mystr contain both first and second sentence

Tell us what’s happening:
I can’t see what is wrong with my code.

Your code so far


// Only change code below this line

var myStr = " This is the first sentence.";
myStr +=  " This is the second string.";

Your browser information:

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

Challenge: Concatenating Strings with the Plus Equals Operator

Link to the challenge:

careful with spaces, do you ever write a sentence putting a space before everything else? or do you usually put a space as first character?
spaces usually go only after words and punctuation

3 Likes

I think in this challenge, myStr should have a value of This is the first sentence. This is the second sentence.
So as @ieahleen pointed out, I suggest removing the first space in the first sentence and also replacing the word "string" in your second sentence with "sentence".