"use strict"; はグローバルコードに書いても良い
JSLint ではグローバルコードに 'use strict';
を書くとエラーになるが、ECMAScript 5 違反ではないらしい。(おそらく、Crockford氏の独自の思想によるエラーだと思う)
think49 think49
"- Global code is strict global code if it begins with a Directive Prologue that contains a Use Strict ..."
http://goo.gl/qaNNL #ES5
http://goo.gl/qaNNL #ES5
think49 think49
@think49 グローバルコードで 'use strict'; して問題ないことを確認した。勿論、"use strict"; でも良い。
http://es5.github.com/#x14.1 #ES5
http://es5.github.com/#x14.1 #ES5