Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to remove last element from array in javascript

var arr = ["f", "o", "o", "b", "a", "r"]; 
arr.pop(); 
console.log(arr); // ["f", "o", "o", "b", "a"]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #element #array #javascript
ADD COMMENT
Topic
Name
1+3 =