Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript array insert at 0

let myArray = [1,2,3];
myArray.unshift(0);
console.log(myArray); // [0,1,2,3]
 
PREVIOUS NEXT
Tagged: #javascript #array #insert
ADD COMMENT
Topic
Name
7+5 =