Enabling strict mode
"use strict";
a = 1; // Will throw an error
Also works at the beginning of function
function foo() {
"use strict";
b = 10; // Throws error
}
"use strict";
a = 1; // Will throw an error
Also works at the beginning of function
function foo() {
"use strict";
b = 10; // Throws error
}