Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to remove last index of array in javascript

var arr = [1,2,3,4];
console.log(arr.splice(0,arr.length-1));
 Run code snippetHide results
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #index #array #javascript
ADD COMMENT
Topic
Name
8+5 =