This repository was archived by the owner on Mar 10, 2024. It is now read-only.
This repository was archived by the owner on Mar 10, 2024. It is now read-only.
lastIndex return 0 if there are no items in the array? #21
I'm wondering if it would be better to follow the same pattern as
indexOfand return-1forlastIndex, when there are no items in the array. Returning0would mean that it's not possible to distinguish an array with 0 and an array with 1 element.