Basic JavaScript - Concatenating Strings with Plus Operator

Hey, I’m facing some problem here, i’m receiving this message:

myStr should have a value of the string This is the start. This is the end.

const myStr ="This is the start. " + "This is the end. "; // Change this line

But i don’t know what i’m doing wrong here…

Tks for now!

Is that extra space at the very end causing problems? Spaces are part of the string. So if the string is supposed to end after the period then having an extra space there will cause the test to fail.

That’s not the problem, the test asks for it…

Humor me. Try getting rid of the space at the very end (after the word end.).

Tks, but i already did, and still the same…

Don’t know what to tell you then. I pasted in your original code and it did not pass. I removed the extra space from the end of the second string and then it passed. That is the issue that is keeping you from passing.

Please paste in your current code so we can see exactly what you are doing.

1 Like

Bro, I was misunderstanding you, I removed the two spaces, not just the one after (end.)
Now i get it and runs perfect!

Tks for all your time!!!

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