ary.unshift(obj, ...) â ary
Instance Public methods
Prepends objects to the front of self
, moving other elements
upwards. See also #shift for the
opposite effect.
1 2 3 | a = [ "b" , "c" , "d" ] a.unshift( "a" ) #=> ["a", "b", "c", "d"] a.unshift( 1 , 2 ) #=> [ 1, 2, "a", "b", "c", "d"] |
Please login to continue.