concat() JavaScript JS

The JavaScript string concat() method retrieves a combination of two or more strings. Original strings will not be modified.

Syntax:

string.concat(string1,string2,...) 

Parameters:
string1,string2,…: Represents the different strings to combined.

Return:
New string after the combination of strings.

Example:

<!DOCTYPE html>
<html>
<body>
<script>
document.writeln("HELLO".concat(" WORLD!"));
</script>
</body>
</html>