Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

array/indexOf should limit fromIndex and allow negative index #2

Closed
millermedeiros opened this issue Oct 20, 2011 · 0 comments
Closed

Comments

@millermedeiros
Copy link
Owner

current implementation isn't ES5 compliant.

indexOf
The index at which to begin the search. Defaults to 0, i.e. the whole array will be searched. If the index is greater than or equal to the length of the array, -1 is returned, i.e. the array will not be searched. If negative, it is taken as the offset from the end of the array. Note that even when the index is negative, the array is still searched from front to back. If the calculated index is less than 0, the whole array will be searched.

source: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant