JS Generator Function


### generator function
Generator 객체를 반환합니다.
```typefunction* generator(i) {  yield i;  yield i + 10;}```

```type*[Symbol.iterator]() { // [Symbol.iterator]: function*()를 짧게 줄임```

```typeconst iterable1 = {};iterable1[Symbol.iterator] = function* () {  yield 1;  yield 2;  yield 3;};console.log([...iterable1]);```


```typeconst iterable1 = {};iterable1[Symbol.asyncIterator] = async function* () {  yield 1;  yield 2;  yield 3;};(async () => {    for await (const x of iterable1 ) {        console.log(x);        // expected output:        //    "hello"        //    "async"        //    "iteration!"    }})();```


> [function*](https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Statements/function*)

> [function*](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*)





