Skip to main content
This topic has been closed for replies.

1 reply

Participant
June 11, 2012

This function is buggy. If the index you're testing is larger than the array's length, the it throws an error instead of returning false, as in "no, that index doesn't exists". A work-around would be:

Inspiring
June 11, 2012

Did you see the bit in the very document you are commenting on that says this: "The index value of an element must be less than the length of the array."?

Whilst I agree the implementation of this function is ill-thought-out, it does do what it says on the wrapper.