Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

unshift

const cities = ['Manchester', 'Liverpool'];
cities.unshift('Edinburgh');
console.log(cities);     // [ "Edinburgh", "Manchester", "Liverpool" ]
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #unshift
ADD COMMENT
Topic
Name
3+9 =