|
|
|
|
|
by Demiurge
4019 days ago
|
|
Ok, it makes sense to me now. indexOf is used on mostly unsorted things, like strings. So, I guess the original problem might use a sorted array, or an object instead of an array, since I think the object keys are sorted and looked up pretty fast. |
|