collection
items to add
updated collection
var arr = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];
arr = unshift( arr, 6.0, 7.0 );
// returns [ 6.0, 7.0, 1.0, 2.0, 3.0, 4.0, 5.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 ]
arr = unshift( arr, 6.0, 7.0 );
// returns <Float64Array>[ 6.0, 7.0, 1.0, 2.0, 3.0, 4.0, 5.0 ]
Adds one or more elements to the beginning of a collection.
Notes
ArrayBuffer
may not be the same as theArrayBuffer
belonging to the input view.