Join two strings:
The result of n will be:
The concat() method is used to join two or more strings.
This method does not change the existing strings, but returns a new string containing the text of the joined strings.
![]()
The concat() method is supported in all major browsers.
| Parameter | Description |
|---|---|
| string1, string2, ..., stringX | Required. The strings to be joined |
| Type | Description |
|---|---|
| String | A new string, containg the text of the combined strings |
| JavaScript Version: | 1.2 |
|---|
Join three strings:
The result of n will be:
JavaScript String Object
Your message has been sent to W3Schools.