Hackonology Forums
How can I remove a specific item from an array? - Printable Version

+- Hackonology Forums (https://hackonology.com/forum)
+-- Forum: Programming (https://hackonology.com/forum/forumdisplay.php?fid=129)
+--- Forum: Java (https://hackonology.com/forum/forumdisplay.php?fid=132)
+---- Forum: Java Script (https://hackonology.com/forum/forumdisplay.php?fid=133)
+---- Thread: How can I remove a specific item from an array? (/showthread.php?tid=1009)



How can I remove a specific item from an array? - Programmer - 10-04-2021

I have an array of numbers and I'm using the .push() method to add elements to it.
Is there a simple way to remove a specific element from an array?
I'm looking for the equivalent of something like:
Code:
array.remove(number);

I have to use core JavaScript. Frameworks are not allowed.