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);
}
This reddit thread points to tc39-notes/july-29.md at 4c6534b52ca829f74ed75e4fe78b74f5a55dc0bf · rwaldron/tc39-notes · GitHub
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.