Is there any other way to remove values in an array other than pop()?

Sometimes I found it's lagging when it comes to arrays. Is there any other way to remove elements?

  • Girish
  • 30 Apr 2026
  • 1240 Views
  • 7 Answers
Your Answer

Yes 👍 there are other ways besides pop() to remove values from an array:

1. shift() → removes first element
JavaScript
arr.shift();
2. splice() → removes from any position
JavaScript
arr.splice(1, 1); // remove 1 element at index 1
3. filter() → remove by condition
JavaScript
arr = arr.filter(x => x !== 10);
Short answer (exam):
Yes, methods like shift(), splice(), and filter() can also be used to remove elements from an array.

Javascript

Didn't get the answer.
Contact people of Talent-Javascript directly by clicking here