How to remove a specific element from an array in JavaScript?
Hello everyone! I just started learning JavaScript and ran into a problem. I have an array with numbers:
```javascript
let numbers = [10, 20, 30, 40, 50];
```
I want to remove the number 30 from it. I tried using `delete numbers[2]`, but after that an empty item remains in the array, and the array length doesn't change. Then I heard about the `splice()` method, but I didn't quite understand how it works — it removes by index, but I need to remove by value. If I don't know exactly what position the element is at, what should I do?
I also tried filtering with `filter()`, but it seems to create a new array rather than modifying the original one. And I need the original array to be changed. In short, please tell me how to properly remove an element from an array by its value, not by index.