> For the complete documentation index, see [llms.txt](https://simian114.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://simian114.gitbook.io/blog/undefined-1/diary/2021/march/20210330.md).

# 20210330(화)

### 1. 학습 날짜

* 2021-03-30

### 2. 학습 시간

* 10:00 \~ 24:00

### 3. 학습 범위 및 주제

* 자바스립트 학습하기

### 4. 학습 목표

* 강의 듣기

### 5. 학습 정리

* [이벤트 루프 임시 정리](https://simian114.gitbook.io/blog/undefined/javascript/undefined-5/undefined)
* [유튜브](https://www.youtube.com/watch?v=8aGhZQkoFbQ)

### 6. 상세 학습 내용

* JS 는 멀티스레딩을 지원하지 않는다. 그런데 어떻게 setTimeout 과 같은 비동기를 실행할 수 있을까?
* 이건 바로 WEB API 기 때문. Web API 는 브라우저가 JS엔진 대신에 실행시켜주는 것.
* 즉 우리가 setTimeout 코드를 사용하면 이 코드가 JS 의 콜스택에서 실행되고 그 결과로 브라우저가 대신 실행해주는것.
* 그리고 브라우저에서 정해진 시간이 끝나면 그 전달된 callback 이 **task queue** 로 들어오게 된다. -- **이벤트루프** 는 JS의 콜스택, task queue, render, micro task queue 등을 차례로 순회하면서 작업이 있는지 살펴본다. setTimeout 의 결과로 task queue 로 작업이 들어왔으므로 EL 은 이 콜백을 JS으 ㅣ콜스택으로 옮긴다.
* 콜스택으로 옮겨지면 콜백메서드는 실행된다.
* 그리고 다시 이벤트 루프는 위에서 이야기한 녀석들을 순회하면서 감시한다.

### 7. 오늘 학습 내용에 대한 개인적인 총평

* 이벤트 루프를 제외하고도 어떻게 하면 코드를 더 구조적으로 짤 수 있을지에 대한 고민을 많이했다. 뭐 ... 이 부분은 찾아본게 아니라 머리속으로만 생각한 부분이라 정리가 된게 아무것도 없다 흠...&#x20;
* C언어는 이론이 매우 어려운데 자바스크립트는 이론을 한번 딱 보면 이해가 잘 된다.. 심지어 양질의 자료도 C랑은 차원이 다르게 많아서 좋다. 훌륭한 개발자가 되자.

### 8. 다음 학습 계획

* 강의 복습&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://simian114.gitbook.io/blog/undefined-1/diary/2021/march/20210330.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
