archives

« Bugzilla Issues Index

#3522 — Single argument Array.prototype.splice


Following on from https://esdiscuss.org/topic/single-argument-array-prototype-splice (yes that thread is 4 years old), it would seem that Array.prototype.splice's definition needs an update to spec the single -arg version as being equivalent to calling it with a second argument equal to the length of the array.

All major browsers and engines were in agreement, until Nashorn entered the game. Because they follow the spec as written, they have broken the de-facto standard. https://bugs.openjdk.java.net/browse/JDK-8023252


Isn't that already handled in the ES6 spec.
See http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.splice
step 10


Yes it is, I overlooked that! Thanks so much!