Let's say I have this array:
var a = [1,2,99,3,4,99,5];
I would like to get the position of the second 99
, something like:
a.indexOf(99, 2) // --> 5
However the second argument in indexOf
just tells where to start the search. Is there any built in functions to make this? If not how would you do it?
Thanks!