unshift
can.List.prototype.unshift
Add elements to the beginning of a List.
list.unshift(...elements)
unshift adds elements onto the beginning of a List.
Parameters
-
elements
{*}the elements to add to the List
Returns
{Number}
the new length of the List
unshiftadds elements to the front of the list in bulk in the order specified:If you have an array you want to concatenate to the beginning of the List, you can use
apply:Events
unshiftcauses change, add, and length events to be fired.See also
unshifthas a counterpart in shift, or you may be looking for push and its counterpart pop.