How can I remove a specific element from an array?

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:

array.remove(number);

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

  Topic Subtopic Tags javascript
4 Years 0 Answers 1.1k views

Chayan Biswas

Knowledge Areas : Mentoring, Choosing a Career, Getting Promoted, Windows O/S, Mac O/S, General Computer Questions, WiFi Questions, Networking (deprecated and moved to "Internet Connectivity"), Graphic Design, User Experience (UX), Architecture

Reputation Score: 90

Submit An Answer

To answer this question, you must be logged in.

Create an account

Already have an account? Login.

By Signing up, you indicate that you have read and agree to Sage's Terms and Conditions and Privacy Policy