// global auf der ersten Zeile des Scripts
"use strict";
function strict() {
"use strict";
return "bla";
}
Zudem gibt es einige zusätzliche Runtime Errors, welche im normalen Javascript Mode ignoriert werden. Die Details dazu findet ihr im unten verlinkten MDN Artikel.
- Octal syntax (var n = 023;)
- wit statement
- Using delete on a variable name delete myVariable;
- Using eval or arguments as variable or function argument name
- Using one of the newly reserved keywords (in prevision for ECMAScript 6): implements, interface, let, package, private, protected, public, static, and yield
- Declaring function in blocks if(a
- Obvious errors
- Declaring twice the same name for a property name in an object literal {a: 1, b: 3, a: 7} This is no longer the case in ECMAScript 6 (bug 1041128).
- Declaring two function arguments with the same name function f(a, b, b){}
Labels: ecma, javascript, strict