Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript array add front

// example:
let yourArray = [2, 3, 4];
yourArray.unshift(1); // yourArray = [1, 2, 3, 4]

// syntax:
// <array-name>.unshift(<value-to-add>);
 
PREVIOUS NEXT
Tagged: #javascript #array #add #front
ADD COMMENT
Topic
Name
2+4 =