0

Remove last item from array in JavaScript

JavaScript
var arr = [1,0,2];

arr.splice(-1,1);

console.log(arr); // [1, 0]
RUN
add comment
Suggest a different solution or add another example