javascript array concat spread operator

JavaScript
const arr1 = [1,2,3]
const arr2 = [4,5,6]
const arr3 = [...arr1, ...arr2] //arr3 ==> [1,2,3,4,5,6]const a = ['to', 'code'];
const b = ['learning', ...a, 'is', 'fun']; 
console.log(b); //> ['learning', 'to', 'code', 'is', 'fun']
Source

Also in JavaScript: