burebistaruler burebistaruler - 1 year ago 68
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 !

Answer Source
return index;

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download