I am trying to remove an object from an array, but for some reason it's not working. I am under the impression that a splice accepts 2 parameters: first, the position in the array to begin at. And for parameter 2, how many to delete from then on out.
I just want to delete one entry so I am doing this:
array.splice(i,0);
But it isn't working. Can someone tell me what I am doing wrong and enlighten me on how it is supposed to work.
If you want to remove one element, you call splice(index, 1)
.