Brendan Eich wrote:
I would imagine arrays, NodeLists, arguments, and other array-likes all respond to for-of; if they don't, that seriously decreases the utility of for-of!

Array.from is

s/is/tests/

that an object is either iterable, or failing that, array-like (even if no .length property, ToUint32(undefined) => 0 so no elements). See bottom of https://mail.mozilla.org/pipermail/es-discuss/2012-July/024207.html.

As for the list of built-ins after arrays, specifically "NodeLists, arguments, ..." I agree these should all be iterable.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to