Sorry if I was unclear; it's *impossible* to have an array without a `.length` own property, and there'd be no way to get the length or iterate over it if you did. I'm also not clear on why you'd want to store named properties on an array, especially if you can't iterate it because it doesn't have a length?
On Thu, Jan 10, 2019 at 11:04 AM T.J. Crowder < [email protected]> wrote: > On Thu, Jan 10, 2019 at 1:54 PM Augusto Moura > <[email protected]> wrote: > > > > If you don't want the iterable features neither the own properties, > > what're the benefits over a object indexed by numbers `const o = > > Object.create(null); o[0] = 12; ...`? > > Exactly. > > And re functions, using them as state containers without their usual > features seems like a bad idea^H^H^H^H^H^H^H^H edge case best handled > by `setPrototypeOf` and `delete`. :-) > > -- T.J. Crowder > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

