Javascript Spread Operator ...
The javascript spread operator ... is a convenient way to insert an array into a second array. Used mainly when defining the array data. Consider the following:
/**** * The x array is placed inside of noSpread as a child array inside. * noSpread array is now ['u', Array(2), 3, 7] ****/
let x = ['a', 2];
let noSpread = ['u', x, 3, 7];/***
* using the spread operator ...x
* the spread array is now ['u', 'a', 2, 5, 6]
***/let x = ['a', 2];let spread = ['u', ...x, 5, 6];