# 1.2.6.3.嚴謹模式

* 嚴謹模式
  * 可以避免某些情況下的錯誤

    ```
    //打錯字
    var Person;

    persom = {};
    //印出Object{}
    console.log(persom);
    ```
  * use strict一定要在檔案或是函數的最上方
  * 一定要宣告

    ```
    "use strict"
    //打錯字
    var Person;

    persom = {};
    //印出Uncaught ReferenceError: persom is not defined
    console.log(persom);
    ```
* [參考資料: MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode)


---

# 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://jen-hsuan-hsieh.gitbook.io/javascript-node-js/chapter1/12javascript-quan-gong-lve-ff1a-ke-fu-js-de-qi-guai-bu-fen/126za-tan/1263yan-jin-mo-shi.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.
