Say that I have an array containing strings:
var array = ["test","apple","orange","test","banana"];
and some strings are exactly the same (test). Say that I want to get all the indexes in the array where the string test is located in the array and not just the first indexOf. Is there a nice solution to this problem that is as fast as possible and not using jQuery, I.E getting 0,2 as a result?
Thanks