Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
"use strict" 지시문은 다음 매개변수 중 한 개가 있는 함수의 맨 위에 작성됩니다:
"use strict" 지시문은 ECMAScript 동작에 따라 이러한 함수의 맨 위에 허용되지 않습니다.
다음은 함수 sum 에는 기본 매개 변수 a=1 및 b=2가 있는 경우입니다:
함수가 strict mode 모드에 있어야 하고 전체 스크립트 또는 포함된 함수가 strict mode에 있어도 괜찮으면 함수 외부에서 "use strict" 지시문을 이동할 수 있습니다:
함수 표현식은 또 다른 해결방법을 사용할 수 있습니다:
이것은 다음 표현식으로 변환 될 수 있습니다:
화살표 함수가 this에 접근해야 하는 경우에는, 둘러싼 함수로 화살표 함수를 사용할 수 있습니다:
이것은 다음 표현식과 같이 변환될 수 있습니다:
This page was last modified on 2023년 8월 9일 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.