You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed this while pushing around our old buddy, the deprecated "with" statement. This is with Babel transpilation enabled, which I believe always enforces strict mode.
Running this is fine, and evaluates to 'true': with (true) console.log(toString());
But if I create a syntax error within the "with" statement: with (true) console.log(toString(!));
I get SyntaxError: 'with' in strict mode— even though it was happily using "with" in strict mode before I added nonsense.
The text was updated successfully, but these errors were encountered:
I noticed this while pushing around our old buddy, the deprecated "with" statement. This is with Babel transpilation enabled, which I believe always enforces strict mode.
Running this is fine, and evaluates to
'true'
:with (true) console.log(toString());
But if I create a syntax error within the "with" statement:
with (true) console.log(toString(!));
I get
SyntaxError: 'with' in strict mode
— even though it was happily using "with" in strict mode before I added nonsense.The text was updated successfully, but these errors were encountered: