strings javascripts

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.";

Your browser information:

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

Challenge: Concatenating Strings with the Plus Equals Operator

Link to the challenge:

The test expects a space between the sentences. How will you get that in there?

Hi @lipika42 !

Welcome to the forum!

For these string exercises, I suggest you add a console.log so you can see exactly what is being printed.

It will help you see the problem better.

var myStr = "This is the first sentence.";
myStr += "This is the second sentence.";
console.log(myStr) // result: This is the first sentence.This is the second sentence.

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