What's the rationale for making this code a syntax error?
function foo(a = 1) {
"use strict";
console.log(a);
}
What's the rationale for making this code a syntax error?
function foo(a = 1) {
"use strict";
console.log(a);
}
I see, thanks!
I wasn't aware that the parameter list is evaluated with the strictness of the body. But considering that
function foo(x, x) {
"use strict";
}
Is an error, I can see the motivation.