use of ‘use strict’?

seen from United Kingdom
seen from Hungary

seen from Canada
seen from China

seen from United States
seen from Italy
seen from China

seen from Canada

seen from Malaysia

seen from Canada
seen from South Africa

seen from United States
seen from United States
seen from United States

seen from Canada
seen from United States
seen from United States
seen from United States
seen from China

seen from Canada
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.