You can use the indexOf method like this:

var index = array.indexOf(item);
if (index !== -1) {
  array.splice(index, 1);
}

Note: You'll need to shim it for IE8 and below

var array = [1,2,3,4]
var item = 3

var index = array.indexOf(item);
array.splice(index, 1);

console.log(array)

Answer from SLaks on Stack Overflow
🌐
CoreUI
coreui.io › answers › how-to-remove-a-specific-item-from-an-array-in-javascript
How to remove a specific item from an array in JavaScript · CoreUI
September 18, 2025 - Use splice() with indexOf() to efficiently remove a specific element from a JavaScript array by value or index.
🌐
SitePoint
sitepoint.com › javascript
Removing elements from an array - JavaScript - SitePoint Forums | Web Development & Design Community
November 2, 2017 - What I am trying to achieve is that after the first click the elements are removed so it must always have 3 · Wouldn’t it be easier to simply assign a new array then? ^^ If you want to implement something that behaves similar to a circular queue though, a possible solution might go like · const pushCyclic = (array, ...values) => array.concat(values).slice(-array.length) const myArray = [1, 2, 3] pushCyclic(myArray, 4) // -> [2, 3, 4] pushCyclic(myArray, 4, 5) // -> [3, 4, 5] pushCyclic(myArray, 4, 5, 6) // -> [4, 5, 6] pushCyclic(myArray, 4, 5, 6, 7) // -> [5, 6, 7]
Discussions

Why is removing a specific element from an array so needlessly complicated in Javascript?
You could use the .filter method. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter Use it like this: const newArray = array.filter(element => element > 6) The 'element > 6' is just a placeholder example. If your array was a series of numbers, it would only return numbers that are greater than six. If you wanted it to remove a certain word from an array of words you could switch that conditional statement out with "element !== 'word' " 'newArray' will be your array without the value you're trying to remove. 'Array' represents the current array with the value you're trying to remove More on reddit.com
🌐 r/learnprogramming
9
0
January 17, 2023
How do I remove from an array those elements that exists in another array?
All you need is a simple filter function, or you could just manually loop over the array. var filteredPeople = people.filter(function(element) { return peopleToRemove.indexOf(element) === -1; }); More on reddit.com
🌐 r/javascript
11
8
September 10, 2014
Is it possible to remove individual values from an file input multiple element?
So far as defined in the FileList API I don't think this is possible. Are you trying to block a certain type of file, client side? Perhaps it would be better to just define what types of file you want to allow via markup, e.g. http://dev.w3.org/html5/spec/number-state.html#attr-input-accept More on reddit.com
🌐 r/javascript
6
4
August 17, 2011
Overwrite array in object array by value of a key?
For more advanced object and array manipulation, lodash can really help: http://lodash.com/ Highly recommend taking a look. But in vanilla JS, you could do: var people = [ {"name": "Dave" , "owns":["House", "Car", "Boat"]}, {"name": "Mike" , "owns":["Dog", "House", "TV"]}, {"name": "Fred" , "owns":["Sofa", "Elephant", "Space Station"]}, {"name": "Larry" , "owns":["Land", "Coins", "Iron Lung"]} ]; function updateOwnership(name, objects) { for (var i = 0; i < people.length; i++) { if (people[i].name === name) { people[i].owns = objects; break; } } } updateOwnership('Fred', ["Guitar", "Flowers", "Socks"]); console.log(people); More on reddit.com
🌐 r/javascript
12
2
August 7, 2014
🌐
CoreUI
coreui.io › blog › how-to-remove-element-from-javascript-array
How to Remove Elements from a JavaScript Array · CoreUI
February 13, 2025 - In many real-world applications dealing with JavaScript objects and arrays, you might need to remove array elements based on user input or a dynamically generated condition. By using methods like splice or filter, you can handle different methods of removal gracefully. For instance, if you must remove an element of the array with a specified value, consider filter.
🌐
Ultimate Courses
ultimatecourses.com › blog › remove-specific-item-from-array-javascript
Removing Items from an Array in JavaScript - Ultimate Courses
March 12, 2020 - In this example, we are removing items from the initial array by returning a new array of just the items we do want, using drinks[i] allows us to look at and compare the array element’s value (such as 'Coffee' as a String in this case):
🌐
DEV Community
dev.to › pradeepovig › javascript-remove-a-specific-element-from-an-array-3k1b
Javascript: Remove a specific element from an array - DEV Community
May 9, 2021 - You need to install and import it to use this solution. The _.remove() method removes all elements from array that predicate returns truthy for by manipulating the original array in place.
Find elsewhere
🌐
Reddit
reddit.com › r/learnprogramming › why is removing a specific element from an array so needlessly complicated in javascript?
r/learnprogramming on Reddit: Why is removing a specific element from an array so needlessly complicated in Javascript?
January 17, 2023 -

I'm just looking for something along the lines of:

array.remove("element")

Upon Googling for solutions so far I've found

Remove an element at any index with splice

Remove an element from an array with a for loop and push

Remove an element at any position of an array with slice and concat

There's more but I'm assuming you get the point. Why is this seemingly simple task so ridiculously complicated with Javascript?

Did nobody think to include a ".remove()" method when they were first developing Javascript? Is there a quirk of the language that makes it impossible? What is the reason for this?

🌐
Zipy
zipy.ai › blog › remove-specific-item-from-array
remove specific item from array
April 12, 2024 - The arrow function fruit => fruit !== 'banana' acts as the condition, where only elements that don't match 'banana' are included in the new array. The filter() method is a safer option than splice() because it doesn't modify the original array. Sometimes, you might need to remove an item from an array based on its value rather than its index.
🌐
Scaler
scaler.com › home › topics › remove elements from a javascript array
Remove Elements from a JavaScript Array - Scaler Topics
March 12, 2024 - The predicate determines which elements should be removed based on the return value (true for removal). ... Let's use Lodash to remove all even numbers from an array of integers. ... The original array numbers is modified to only include odd numbers [1, 3, 5]. The removed array contains the even numbers [2, 4, 6] that were removed. The Lodash _.remove method is particularly useful for remove element from array JavaScript tasks where elements need to be removed based on specific criteria, offering both modification of the original array and access to the removed items.
🌐
Fjolt
fjolt.com › article › javascript-how-to-delete-array-item-at-index
Deleting an Item in an Array at a Specific Index
First, we get the index of the item we want to delete by value, using indexOf. Then, we use that number to delete the array item. Here’s an example. We want to delete the item ravioli from our array below.
🌐
Tutorial Republic
tutorialrepublic.com › faq › how-to-remove-an-item-from-a-javascript-array-by-value.php
How to Remove an Item from a JavaScript Array by Value
CSS At-rules CSS Properties CSS ... Topic: JavaScript / jQueryPrev|Next · You can simply use the JavaScript indexOf() method in combination with the splice() method to remove an item or element from an array by val...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Array › splice
Array.prototype.splice() - JavaScript | MDN
An integer indicating the number of elements in the array to remove from start. If deleteCount is omitted, or if its value is greater than or equal to the number of elements after the position specified by start, then all the elements from start to the end of the array will be deleted.
🌐
DEV Community
dev.to › smpnjn › deleting-an-item-in-an-array-at-a-specific-index-3mif
Deleting an Item in an Array at a Specific Index - DEV Community
September 18, 2022 - First, we get the index of the item we want to delete by value, using indexOf. Then, we use that number to delete the array item. Here's an example. We want to delete the item ravioli from our array below.
🌐
Sentry
sentry.io › sentry answers › javascript › how can i remove a specific item from an array?
How Can I Remove a Specific Item from an Array? | Sentry
... The splice() method takes two arguments, the index of the element you wish to remove and the index you wish to remove up to. The splice() method creates a new array that stores all the values that were removed from the original array.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Array › reduce
Array.prototype.reduce() - JavaScript | MDN
The reduce() method of Array instances executes a user-supplied "reducer" callback function on each element of the array, in order, passing in the return value from the calculation on the preceding element. The final result of running the reducer across all elements of the array is a single value.
🌐
Quora
quora.com › Is-there-a-method-to-remove-an-item-from-a-JavaScript-array-How-do-you-remove-item-from-array-by-value
Is there a method to remove an item from a JavaScript array? How do you remove item from array by value? - Quora
Answer (1 of 3): As others have mentioned. Use the [code ]splice[/code] method of array to remove the item. Alternately, if you prefer functional programming, where you don't actually alter the original array, you can use [code ]filter[/code] ...
🌐
ServiceNow Community
servicenow.com › community › it-service-management-forum › to-remove-element-from-an-array › m-p › 810379
Solved: To remove element from an array.
February 22, 2023 - If it is present then it should remove the previous (test1)value from test2. For this, I wrote a before business rule on test1which runs on the condition when test1 changes. ... function executeRule(current, previous /*null when async*/) { if(current.u_test2.nil()){ current.u_test2 = current.u_test1; } else{ var prev = previous.u_test1; var users = current.u_test2.split(','); users.push(current.u_test1.toString()); var arrayUtil = new ArrayUtil(); var a1 = new Array(users); var a2 = new Array(prev); var newUsers = arrayUtil.diff(a1, a2); current.u_test2 = newUsers.toString(); } })(current, previous);
🌐
freeCodeCamp
freecodecamp.org › news › how-to-remove-an-element-from-a-javascript-array-removing-a-specific-item-in-js
How to Remove an Element from a JavaScript Array – Removing a Specific Item in JS
August 31, 2022 - The two arrays are concatenated together with concat to form an array that is similar to the starting one, but without a particular element. If you want to remove an element with a certain value, you can use Array.prototype.filter().
🌐
Hashnode
heyitsvajid.hashnode.dev › how-to-remove-specific-item-from-array-by-value-in-javascript
How to remove specific item from array by value in Javascript?
August 9, 2022 - I work as a Software Engineer in the Bay Area. For most of my professional life, I have worked on full-stack web applications using Javascript frameworks.