Tell us what’s happening: myStr should have a value of This is the start. This is the end.…my question is :
which is the value??
Passed
Your code so far
// Example
var ourStr = "I come first. " + "I come second.";
// Only change code below this line
var myStr = myStr + "This is the start. " + " This is the end.";
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36.
There are 2 problems with the above. First, as mentioned by @ILM, myStr is undefined here so it cannot be concatenated. Let’s get rid of that.
var myStr = "This is the start. " + " This is the end.";
Now we’re close, but FCC still won’t accept our answer here. Hmmm… What’s different between our code above and FCC’s example at the start of our exercise? Ah, I see it. We have an extra space at the beginning of our string, and that extra space will make a difference.
The above code generates:
"This is the start. This is the end."
That’s too many spaces. Can you figure it out from here?