Does indexOf simply walk through the array or does it do something that is faster? I know that this is implementation dependent but what does Chrome or Firefox do?
With no guarantees about the nature or order of items in an array, you cannot do better than O(n), so it would walk through the array. Even if it was to parallelise the actual search across CPUs (no idea if firefox or chrome do this, but they could), it does not change the time complexity with a finite number of CPUs.