Basic JavaScript - Concatenating Strings with the Plus Equals Operator

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

Your code so far

let myStr = "This is the first sentence." += "test";
console.log(myStr)

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

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

Link to the challenge:

Hi there! Welcome to the community.

Please try to include a detailed description, in your own words, of the issue you are having. Being able to describe an issue is an important skill in programming and will help others help you troubleshoot.

Take another look at the example given in the problem to see how the += operator should look in your code.

Whatever happend to the second sentence?
“This is the second sentence.”

How did the “+=” operator escape? Catch it and put it where it belongs!

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