(Concatenating Strings with Plus Operator)

Can i do wrong??

Your code so far

// Example
var ourStr = "I come first. " + "I come second.";

// Only change code below this line
var myStr = "This is the start." + "This is the end.";

Your browser information:

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

Link to the challenge:

What i do wrong??can you help me

var myStr = "This is the start." + " " + "This is the end.";

thanks it’s right.You help me a lot


Please mark as solution

1 Like

“This is the start.” + “This is the end.”;

var myStr = "This is the start." + " " + "This is the end.";\

Funny thing is that his own solution passed for me too…

i find it but thank you for your help

I am curious. I was stuck on this myself, and before I checked the forum. I watched youtube videos for this lesson. Actually watched a number of them. And in the videos they all passed using
var myStr = ‘This is the start.’ + ‘This is the end.’ Or using var myStr = “This is the start.” + “This is the end.”

But only your method passed for me. So thank you, But wondering your thoughts On why they passed the other way. here is quick video https://www.youtube.com/watch?v=RDCBLzotLfE

Look better, they still add a space at the end of first string or at the beginning of second string (the kind of quotes used is not important, both single and double quotes work the same)

1 Like

Thank you. I Think I have a bad habit I need to break, reading to quickly and not paying enough attention.
Thank you again.

1 Like