Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to remove the last value of javascript array

var myFish = ['angel', 'clown', 'mandarin', 'sturgeon'];

var popped = myFish.pop();

console.log(myFish); // ['angel', 'clown', 'mandarin' ]

console.log(popped); // 'sturgeon'
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #remove #javascript #array
ADD COMMENT
Topic
Name
9+2 =