use of ‘use strict’?

seen from Jordan
seen from United Kingdom
seen from Argentina
seen from China
seen from China

seen from United States
seen from United States

seen from United States
seen from United States

seen from Jordan
seen from China

seen from Jordan
seen from Mexico
seen from United States
seen from Türkiye
seen from United States
seen from India

seen from Malaysia

seen from France
seen from Singapore
use of ‘use strict’?
use strict
▼mixi : JavaScriptTraining https://github.com/mixi-inc/JavaScriptTraining
▼“use strict”(厳格モード)を使うべきか? http://analogic.jp/use-strict/
strictモード: より的確なエラーチェックが行われる
これまでエラーにならなかった曖昧な実装がエラー扱いになる
コード内に存在する潜在的な問題を早期に発見しやすくなる
JavaScriptエンジンによる最適化処理を困難にする誤りを修正するため
非strictモードの同一コードより高速に実行することができる場合ある
スクリプト全体への適用
関数に対しての適用
ただし
「スクリプト全体への適用」をする場合、連結するすべてのスクリプトがstrict、または非strictなコードに統一されていれば問題はありません。strictと非strictの混在が問題となります。
⇓
こういったことを回避するために、少なくとも現状ではstrictモードは関数単位で適用するようにした方が良いでしょう。
2013年02月20日の記事
We had a weird issue where after concatenation a certain internal third-party lost “this” reference in one of the anonymous functions after concatenation (part of the build process). After doing a day of investigation, turned out that the problem was the fact that this third party counted on that fact that it will not be in a file, running in strict mode. This SO post does great job explaining “use strict” scoping.