Javascript: remove an element from an array








var e = { 'name':'John West' };
var array = [];
array.push(e);

# remove element from the array
var idx = array.indexOf(e);
array.splice(idx, 1);



No comments:

Post a Comment