I have an array of integers
, which I'm using the .push()
method to add to.
Is there a simple way to remove a specific element from an array? The equivalent of something like array.remove(int);
I have to use core JavaScript - no frameworks are allowed.
indexOf
in IE. – Scotty.NET Sep 13 '13 at 7:48_.without([1, 2, 1, 0, 3, 1, 4], 0, 1); // => [2, 3, 4]
– zhon Sep 27 '13 at 20:42