> For the complete documentation index, see [llms.txt](https://shhn0509.gitbook.io/javascript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shhn0509.gitbook.io/javascript/js-upgrade/curious-story/use-strict.md).

# use strict

## use strict를 사용하는 이유? <a href="#main" id="main"></a>

* 흔히 발생하는 코딩 실수를 잡아내는데 용이하다. 즉, 실수를 했을 때 오류가 발생한다.
* 오류를 알려줘야 디버깅을 할때 편하다. 내가 어디서 실수 했는지 알 수 있다.&#x20;
* 엄격하게 코드 관리가 가능하다.&#x20;
  * 예를 들어 실행 주체가 없이 함수를 실행 시켰을 때, `'use strict'`를 사용하지 않으면 window가 함수의 실행 주체가 되지만 `'use strict'`를 사용하면 `undefined`가 출력된다.&#x20;

```javascript
   function () {
      'use strict';
   }
```
