Link Search Menu Expand Document

Concatenating Strings with the Plus Equals Operator

Summary

  • The += operator can be used to concatenate a string onto the end of an existing string variable.

Final Code

// Only change code below this line

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