Why is looping through an Array so much faster than JavaScript’s native `indexOf`?

5 years from then, lot of changes happened in browsers. Now, indexOf performance has increased and is definitely better than any other custom alternative.

Version 49.0.2623.87 (64-bit)

Chrome Version 49.0.2623.87 (64-bit)

Leave a Comment