Help me this is so strange i can not do this

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

Your code so far


const 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/95.0.4638.69 Safari/537.36

Challenge: Concatenating Strings with Plus Operator

Link to the challenge:

On the next line of the code, put:

console.log(myStr)

and then look in the console window. Compare the string that you are building with what they want: “This is the start. This is the end.

If that isn’t good enough of a hint, please check back.

3 Likes

String concatenation or in more simple words just basic string “addition” is basically combining two or more strings to form a looong string. As in the example.
we create a variable called myStr which is nothing but a container for our combined strings. Using the + operator to combine strings is not at all bad but there are far more better ways to get the same result without repeating our code.

It might seem strange and foreign at first but string concatenation is simply just adding strings like we add numbers. Hope that analogy helps :rocket:

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