On 11 Nov 2010, at 19:30, Dmitry A. Soshnikov wrote:
> OTOH, negative indices, are even not array indices. I.e.
> 
> var a = [1,2];
> a[-1] = 0;
> print(a); // 1,2
> print(a.length); // 2
> 
> From this viewpoint -- for what are they? Seems again, `-n` notations for 
> arrays and strings is useful as a "from the end"-sugar. So now I may propose 
> it.


Yes please, both perl and ruby have it and I often find myself instinctively 
typing it in JS.

-ash
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to