repl.it
@anonymous/

TatteredPlasticProject

Nodejs

No description

fork
loading
Files
  • index.js
index.js
1
2
3
4
5
6
7
8
9
10
11
function* g() {
  yield 1
  yield 2
  return (yield 3) + 1
}

const generator = g()
console.log(generator.next())
console.log(generator.next())
console.log(generator.next())
console.log(generator.next(10))
node v10.16.0