Привет... Какие отличия есть при использовании use strict ?
Одним с них ,который удалось найти
Пример 1:
function isStrictMode(){
return !this;
}
//returns false, since 'this' refers to global object and '!this' becomes false
function isStrictMode(){
"use strict";
return !this;
}
alert(isStrictMode());
Пример 2:
"use strict";
function test() {
foo = "bar"; //ReferenceError: assignment to undeclared variable foo
}
Можно посмотреть другие полезные примеры ,которые покажут разницу ?