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

Allen Wirfs-Brock allen at wirfs-brock.com
Sun Jun 23 18:39:53 PDT 2013


On Jun 23, 2013, at 6:17 PM, Brendan Eich wrote:

> Allen Wirfs-Brock wrote:
>> On Jun 23, 2013, at 1:36 PM, Brendan Eich wrote:
>> 
> 
> Brian Kardell suggested copyRange. Not bad, but I prefer copySlice, it reinforces the (start, end) pattern.

Actually, Kenneth Russell was first with copyRange...

But I  also prefer copySlice and that implies that  using start,end just like slice.



> 
>>   Search result was it because of the -1.
> 
> Sorry, I don't know what you mean here.

myArray.copySlice(toSpot,myAray.indexOf(startMarker), indexOf(endMarker));

indexOf fails with =1


Allen




More information about the es-discuss mailing list