collection
updated collection and the removed element
var arr = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
var out = shift( arr );
// returns [ [ 2.0, 3.0, 4.0, 5.0 ], 1.0 ]
var Float64Array = require( `@stdlib/array/float64` );
var arr = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
// returns <Float64Array>[ 1.0, 2.0, 3.0, 4.0, 5.0 ]
var out = shift( arr );
// returns [ <Float64Array>[ 2.0, 3.0, 4.0, 5.0 ], 1.0 ]
Removes and returns the first element of a collection.
Notes
0
, the first return value does not equal the input reference.