English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
concat()The method is used to concatenate two or more strings.
This method does not change the existing string but returns a new string containing concatenated text.
string.concat(string1, string2, ..., stringN)
var a = 'JavaScript'; var b = 'Tutorial'; var c = a.concat(b);Test and See‹/›
All browsers fully support the concat() method:
Method | |||||
concat() | Is | Is | Is | Is | Is |
Parameter | Description |
---|---|
string1, string2, ..., stringN | The strings to be concatenated to the string |
Return Value: | A new string containing the concatenated text of the provided strings |
---|---|
JavaScript Version: | ECMAScript 1 |
Concatenate three strings:
var a = 'JavaScript'; var b = 'Tutorial'; var c = 'Best Website!!!'; var str = a.concat(b, c);Test and See‹/›