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 coders911.org #
 
PREVIOUS NEXT
Tagged: #javascript #remove #item
ADD COMMENT
Topic
Name
7+4 =