JavaScript concat() Method

JavaScript concat() Method is used to join two or more strings.

Let's create two strings and we can join them using concatenate method and then display the result.

var string1= 'HowToCodeSchool';
var string2 = '.com';
var string3 = string1.concat('',string2);
document.getElementById('output').innerHTML = 'Output: ' + string3;

Output: HowToCodeSchool.com

Video Tutorial

Watch video tutorial on JavaScript concat() Method.