DEV Community

Raisan JMR
Raisan JMR

Posted on

what is concat() in javascript

concat() is a method in used in javascript to concatinate two strings or two arrays.

  1. it does not change the existing string/arrays
  2. it returns a new string/array
  3. it joins two or more strings/array

below is an example of string concatination

string concatination

lets look at how we can use concat() method to join two arrays

array concatination

Top comments (0)