I have an array MyArray and I want to remove one element at position i.
I tried:
MyArray = MyArray.splice(i, 1);
but it's returning the element I want to remove, instead of the array without the element I want to remove.
I''m sure it's a simple fix, thanks anyway.
Change
MyArray = MyArray.splice(i, 1);
into
MyArray.splice(i, 1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With