burebistaruler burebistaruler - 5 months ago 12
Javascript Question

what is the best way to find array indexes using javascript

I have the following array:

var arr = [0,-20, 19, 4, 5, 7, -33]
and I want to extract the index of this array for all values.

I have tried
but will return only one position from array, so what is the best way to extract array indexes.

Thank you !

return index;

This will return you all indexes. Let me know if this is what you want.