# 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)
