Javascript: using the spread operator

Example:

let arr1 = [1, 2, 3];
let arr2 = [...arr1, 4, 5, 6];
The spread operator can expand an iterable into individual elements.

Solution:

console.log(arr2);  // Outputs: [1, 2, 3, 4, 5, 6]

Beginner's Guide to JavaScript