Challenge Bug On Javascript lessons

Tell us what’s happening:

Your code so far

Hello, I think this challenge is broken, I’ve tried the solutions I’ve seen in the forum and it doesn’t let me run the test


// Only change code below this line

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

Your browser information:

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

Challenge: Concatenating Strings with the Plus Equals Operator

Link to the challenge:

No, it’s working fine. I see three issues.

  1. You shouldn’t declare a variable more than once. In other words, you should only use var on the first line.
  2. There should be a space between “myStr” and “+=”.
  3. You’ll need a space somewhere between the sentences - by that I mean a space inside the final string that separates the sentences.

I see, thank you so much!

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