Array#lastIndexOf – fromIndex evaluation
brendan at mozilla.org
Sat Nov 3 14:22:15 PDT 2012
Thanks for raising this -- please do file a bug as Rick suggested.
Asen Bozhilov wrote:
> According to the spec if fromIndex is NaN or undefined the search will
> start from 0. Step 5 of Array.prototype.lastIndexOf performs
> This is in contradiction with String.prototype.lastIndexOf, where even
> if I pass a NaN or undefined for position value, the search will start
> again from the end of the string.
> I am wondering what is the intention of that decision, because it
> seems like bug in specification.
> Thank you.
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss