SOURCE

{
  let tell = function* (){
    	yield 'a';
      yield 'b';
      yield 'c';
  }
  let k = tell();
  console.log(k.next());
  console.log(k.next());
  console.log(k.next());
}
{
  let obj = {};
  obj[Symbol.iterator]=function* (){
    	yield 'a';
      yield 'b';
      yield 'c';
  }
  for(let val of obj){
    console.log(val);
  }
}
{
  let sta = function * () {
    while(1){
      yield '1';
    	yield '2';
    	yield '3';
    }
  }
  let bfn = sta();
  console.log(bfn.next());
} 
console 命令行工具 X clear

                    
>
console