mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-12 12:41:04 +00:00
Created GeneratorFunction (markdown)
parent
ec0299f029
commit
4575279762
12
GeneratorFunction.md
Normal file
12
GeneratorFunction.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
## GeneratorFunction
|
||||
|
||||
```js
|
||||
var a = new GeneratorFunction(function(_yield) {
|
||||
_yield("a");
|
||||
_yield("b");
|
||||
_yield("c");
|
||||
});
|
||||
console.log(a.next().value);
|
||||
console.log(a.next().value);
|
||||
console.log(a.next().value);
|
||||
```
|
Loading…
Reference in New Issue
Block a user