Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

push pop in javascript

// push append the element at the end of the array 

array = [1,2,3] 
array.push(4) 	// [1,2,3,4]

// pop will remove the element from the end of the array. 
array.pop()		// [1,2,3]
Source by www.javascripttutorial.net #
 
PREVIOUS NEXT
Tagged: #push #pop #javascript
ADD COMMENT
Topic
Name
9+2 =