Basic JavaScript - Concatenating Strings with Plus Operator

i cant solve this problem

Your code so far

var ourStr = "This is the satrt" +" This is the End" ; 

var myStr = "This is the start." + " This is the end.";
console.log(myStr);

Your browser information:

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

Challenge: Basic JavaScript - Concatenating Strings with Plus Operator

Link to the challenge:

The error says:

myStr should be created using the const keyword.

i watch the video and do it exactly as mentioned in the video but nothing works.
Your code so far*


var  myStr = "I come first.";
myStr += "I come second. ";


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

console.log(myStr);

Your browser information:

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

Challenge: Basic JavaScript - Concatenating Strings with the Plus Equals Operator

Link to the challenge:

The instructions: " Build myStr over several lines by concatenating these two strings: This is the first sentence. and This is the second sentence."

Where did you find the instruction to add the first two code lines? This is not a requirement here. Also, include a space between two strings in question by adding a blank space after the last word in the first sentence (before the quotation mark).

help to solve

Your code so far


var  myStr = "I come first.";
myStr += "I come second. ";


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

console.log(myStr);  

Your browser information:

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

Challenge: Basic JavaScript - Concatenating Strings with the Plus Equals Operator

Link to the challenge:

Bro you forget full stop…

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