DEV Community

Discussion on: Concatenating two Strings with +=

Collapse
 
jcubic profile image
Jakub T. Jankiewicz • Edited

Actually it's not appending, because strings in JavaScript are immutable. You're creating new string and assign it the to the same variable.

Collapse
 
swarnaliroy94 profile image
Swarnali Roy

If you search the google writing "append string in JavaScript" it will show you the concat method of joining two strings together. And append also means the same, concatenation.
Here I have created two variables that holds two different strings and inside the console.log() I've concatenate those two. So that's why I said appending variables.