このスクリプトがあるとしましょう。
var apple = {
type: "macintosh",
color: "red",
getInfo: function () {
return this.color + ' ' + this.type + ' apple';
}
///more functions here....
}
これらすべての関数を厳密モードで実行するにはどうすればよいですか? ファイルの先頭に「use strict」を置くことはできますが、JSlint はこれを承認しません。別の方法は、すべての関数に「use strict」を入れることですが、より良いオプションはありますか?