Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript remove last item

array.pop();

// Example
var colors = ['Yellow', 'Red', 'Blue', 'Green'];
var removedColor = colors.pop(); // Green
console.log(colors); // ['Yellow', 'Red', 'Blue']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #remove #item
ADD COMMENT
Topic
Name
1+6 =