# JavaScript ES5 教學

## ES5 = ECMAScript 5, 第一個5.x版在2009年12月推出.

JavaScript最新正式版為2015年推出的 ES6, 其中包含了諸多的新功能, 比如說 1. `class` 2. block level的scope變數 `let`, `const`等. 3. 非同步API - Promise <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise> 4. Arrow function 5. 其他

**ES6** 在2015年正式推出, 它包含了 JavaScript ES5的語法, 並推出許多新的語法功能. 現在許多最新版的瀏覽器並沒有實作全部的ES6功能, 通常是 module部份. 而舊版本的當然更不用說了.

故還是會需要從JavaScript ES5 開始學起.

在開始前也可以先參考 [**JavaScript重點整理**](/learning-javascript/javascript-es5-jiao-xue/javascript-zhong-dian-zheng-li.md)

若有物件導向基礎的, 且想先事先知道JavaScript裡面的物件導向是怎麼一回事, 可跳到 [**進階-再講prototype**](/learning-javascript/javascript-es5-jiao-xue/jin-jie-zai-jiang-prototype.md)**一章**


---

# 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://lifeoverflow.gitbook.io/learning-javascript/javascript-es5-jiao-xue.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.
