Utilizor
Contact Us

String Concatenation

Joining strings together.

String Concatenation

The + operator can be used to add (concatenate) strings.

let text1 = "Hello"; let text2 = "World"; let text3 = text1 + " " + text2;

You can also use the concat() method:

let text1 = "Hello"; let text2 = "World"; let text3 = text1.concat(" ", text2);

Example

let text = "Hello" + " " + "World";