Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js unshift vs push

//My Opinion is really nothing. They are the same exept one adds a element
//to the end and the other one adds a element to the front
//    Push Method
var array = [2];//your random array
array.push(3)
//    Unshift Method
array.unshift(1)
 
PREVIOUS NEXT
Tagged: #js #unshift #push
ADD COMMENT
Topic
Name
6+8 =