OneCompiler

Concate Two or more Array

130

// Concate Two or more array

Array.prototype.ConcateArray=function(...arr){

for(let i=0;i<arr.length;i++){
  for(let j=0;j<arr[i].length;j++){
    this[this.length]=arr[i][j]
  }
}
return this

}

let a=[23,56,32]
let b=[1,2,4]
a.ConcateArray(b,[2,3],['NItesh',"kumar"])
console.log(a)