7
« Last post by alone011 on October 18, 2017, 09:48:46 pm »
JavaScript String Operators
The + operator, and the += operator can also be used to concatenate (add) strings.
Given that text1 = "Good ", text2 = "Morning", and text3 = "", the table below explains the operators:
Operator Example text1 text2 text3 Try it
+ text3 = text1 + text2 "Good " "Morning" "Good Morning"
+= text1 += text2 "Good Morning" "Morning