I have a 1 dimensional array like:
var abc = ['a','a','b','a','c']
Now I want to get back all the indexes of 'a'
, that is 0, 1 and 3.
Are there any simple solutions?
P.S.
I know IndexOf
or jQuery.inArray()
. But they just returned the index of first matched element only