# 9회차

## 콜백헬 개선

* Promise&#x20;

  아래와 같은 callbackhell을 개선하기 위함

```javascript
    asyncfunction(params,function(){
      asyncfunction(params,function(){
           asyncfunction(params,function(){
                 asyncfunction(params,function(){
                 });
           });
      });
});
```

* ES6 Generator

```javascript
    function* iterFunc(){
        yeild console.log("첫번째 출력");
        yeild console.log("두번째 출력");
        yeild console.log("세번째 출력");
        yeild console.log("네번째 출력");
    }

    // yield를 만나면 출력을 하고 멈춘다
    // -> 위와 같이 만든함수를 generator 라고 한다
```

* co module

npm install --save co <https://github.com/tj/co>

* async await 사용법

## 이지윅에디터

### 서머노트 특징

* 국내 개발자가 구현
* 부트스트랩기반
* 파일업로드는 ajax로 직접구현
* 반응형 지원

### 기타 시작 및 api확인

URL : <http://summernote.org/getting-started/>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://incheol-jung.gitbook.io/docs/study/nodejs/2018-01-16-nodejs-9st.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
