Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
teechap
· 11y ago · 0 comments
I think the only way .indexOf could be faster than linear is if the array is sorted...
Comments
[–]
Demiurge
11y ago
I got it, it didn't even occur to me the array would be unsorted.