Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove the last element of an array javascript

arr.splice(-1,1)
// OR
arr.splice(arr.length-1,1)

// OR

arr.pop()
 
PREVIOUS NEXT
Tagged: #remove #element #array #javascript
ADD COMMENT
Topic
Name
3+8 =