archives

« Bugzilla Issues Index

#924 — 15.4.4.15 Array.prototype.lastIndexOf - fromIndex is converted directly with ToInteger


In step 5 if `fromIndex' is passed it is converted directly with ToInteger algorithm. Using NaN or undefined for `fromIndex' performs search from 0 instead of the length of the array.


Seems doubtful this can change considering all the runtimes I tested (Chakra, V8, SM) behave interoperably and per this specification. Proposals to change these semantics should go through the proposal process.