Each line below runs silently in sloppy mode but fails in strict mode. The directive applies per script, so concatenating a strict file with sloppy ones can change behavior.
| Strict-mode code | Result |
|---|---|
| x = 1 with no declaration | ReferenceError |
| Writing a frozen, getter-only or non-extensible property | TypeError |
| delete Object.prototype / delete x | TypeError / SyntaxError |
| with (obj) {}, 010, "\45", eval = 1 | SyntaxError |
| eval("var v = 1"); v | ReferenceError: v stays inside eval |
| let implements = 1 (also interface, package, private ...) | SyntaxError |
| (14).label = "x" | TypeError |