转发: Re: Proposal: Array.prototype.first() and Array.prototype.last()

Li Xiaolong 898310778 at outlook.com
Tue Sep 27 13:10:58 UTC 2016


It is obvious that ‘.’ before a number will be recognized as a decimal
point, which is different from the point that gets a property. For example,
.2===0.2 is true. What’s more, the array’s prototype is object, which
means arr[-1] will get the value of -1 rather than length-1. The array can
store values at -1 like other objects. If you use -1 to represent length-1,
so how do we refer to the value of -1?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160927/5c0f6ccc/attachment.html>


More information about the es-discuss mailing list