2014-11-17 3:34 GMT+01:00 Frankie Bagnardi <[email protected]>:
> Consider when Array.isArray would be used. In my experience, checks to
> see if something is an array are used for:
>
> - deciding how to iterate it (for(;;) vs for..in, for example)
>
This is a good one. Here, again, a typical proxy-for-array would work as
intended, as the for(;;) loop just queries .length and properties named
"0", "1", ... via standard [[Get]] access.
Can someone come up with a convincing example where a proxy-for-array would
*not* work as intended?
("convincing" here means it doesn't involve a proxy that blatantly violates
the Array contract on purpose)
Cheers,
Tom
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss