The following works on the JavaScript runtimes I've checked (Node.js and Firefox):
let xs = [0, 1, 2]
let it = xs[Symbol.iterator]()
for (let x of it) console.log(x)
This works because the it iterator is itself iterable, i.e. it has a Symbol.iterator property. One could presume this is because Array.prototype[Symbol.iterator] is implemented as a generator.
My question is, can I rely on it being iterable? That is, is it required by the spec?
I've looked (this is the relevant part, I think) and I can't find anything that says that an array iterator should be iterable, or that it must be implemented with a generator.