JavaScript Array filter function removes only one element with splice -


so want remove 2 objects array checking values. there code - http://prntscr.com/bvqa16

what happens removes 1 element array. tried same thing $.each , array.foreach, no success.

where problem?

the slice function works 2 parameters, first being start of slice (in case, variable i), , second being index of how far slice. think problem stems giving slice wrong parameters.

here link array.prototype.slice() function: array.prototype.slice()


Comments