JavaScript - Prepend item to array
Add item to front of an array.
Add element (or elements) to front of array. The length of the resulting new array is returned.
{{array}}.unshift({{item}})
Add item to front of an array.
Add element (or elements) to front of array. The length of the resulting new array is returned.
{{array}}.unshift({{item}})
Creates a shallow copy of array and prepends item to the copied array.
{{array}}.slice(0).unshift({{item}});