function*gen() { /\*some code \*/}
var g = gen();
g[Symbol.iterator]() === g // true
gen
is a Generator
function, calling it will generate a traverser object g
. Its Symbol.iterator
property, which is also an iterator object generation function, returns itself after execution