Variable should have a string

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

// Only change code below this line

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


i dont know why in the output its showing that myStr should have a value of a string. can someone help me in this as the var myStr is already in string double quotes.

Your browser information:

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

Challenge: Concatenating Strings with the Plus Equals Operator

Link to the challenge:

Hi @waniahmed3 !

Welcome to the forum!

You have two spacing issues.

You need to add a space here in the first sentence.

If you look at the console it currently says this.

There needs to be a space between the first and second sentence.

You added an extra space at the end of your second sentence.

Get rid of that and the test will pass.


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