New ES6 strawman: Array.prototype.fill and Array.prototype.move

Axel Rauschmayer axel at rauschma.de
Sun Jun 23 12:59:56 PDT 2013


On Jun 23, 2013, at 21:21 , Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:

> See http://wiki.ecmascript.org/doku.php?id=strawman:array_fill_and_move for a strawman proposal for two new Array methods.  These are proposed for inclusion in ES6.

Array.prototype.move = function move(target=0,source=0, count=this.length-source)
Is the case of moving trailing elements somewhere else very common? If not, then I’d define the parameters in this order: source, count, target.
Rationale: easier to memorize.

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130623/1e499eb7/attachment.html>


More information about the es-discuss mailing list