Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

push element to array to first place js

let arr = [4, 5, 6]

arr.unshift(1, 2, 3)
console.log(arr);
// [1, 2, 3, 4, 5, 6]
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #push #element #array #place #js
ADD COMMENT
Topic
Name
1+6 =