How to append an array to another array in JavaScript ES6

1 Answer

0 votes
const arr1 = [87, 120, 99];

const arr2 = [690, 17];

arr1.push(...arr2);

console.log(arr1);


     
/*
run:
   
[ 87, 120, 99, 690, 17 ]
 
*/

 



answered Mar 9, 2020 by avibootz

Related questions

...