Slide 3
Slide 3 text
“use strict”
“use strict”;
function foo() {
abc = “def”; // throw TypeError when variables does not have
`var` declaration.
var obj1 = {};
Object.defineProperty(obj1, "x", { value: 42, writable: false });
obj1.x = 9; // throw TypeError when you substitute unwritable
variable
with (obj1) { // Restrict `with`
x;
}
}