Just checked and IE8 returns `[]` correctly weeee! On Tue, Jul 3, 2012 at 8:49 AM, John-David Dalton < [email protected]> wrote:
> I recently saw something like > > var a = ['a', 'b', 'c', 'd']; > a.splice(2); // -> ['c', 'd'] in latest Chrome, Opera, Firefox, Safari, > Rhino, RingoJS, you name it > > by spec though I thought the `deleteCount` should be `0` and so return > `[]`. > http://es5.github.com/#x15.4.4.12 > > "Let *actualDeleteCount* be min(max(ToInteger<http://es5.github.com/#x9.4> > (*deleteCount*),0),*len* –* actualStart*)." > > var a = ['a', 'b', 'c', 'd']; > a.splice(2, 0); // -> [] > > Am I reading it wrong or is this a bug in most engines? >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

