Array.slice() & indexOf() should work with no/undefined final parameter

Oct 15, 2013 at 11:07 AM
Found while trying to use Jint to process javascript from

[1, 2].slice() and [1, 2].slice(undefined) work fine under all major browsers, but Jint's current implementation of slice fails if the count parameter isn't supplied.

Likewise [1, 2].indexOf(1, undefined) works fine, but Jint's implementation (JsArrayConstructor.IndexOfImpl) fails if the 2nd parameter isn't a valid integer.