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>);
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #array #add #front
ADD COMMENT
Topic
Name
6+5 =