Tuesday, June 12, 2018

JavaScript - Array Methods - concat

Below code demonstrates the usage of array method:
  • concat
var Arr1 = [1,2,3,4,5,6,7];

var Arr2 = ["Agra","Bengaluru"]

console.log(Arr1.concat(Arr2));

Refer:  https://docs.microsoft.com/en-us/scripting/javascript/reference/concat-method-array-javascript

Practice at: http://jsbin.com

No comments:

Post a Comment