4 ms·
> if (foo = bar()) { // syntax error! That's already an error in strict mode (which would presumably be on for anyone writing bleeding-edge JS).
by fenomas 7y ago
> if (foo = bar()) { // syntax error!
That's already an error in strict mode (which would presumably be on for anyone writing bleeding-edge JS).
- AgentME 7y agoIt's only an error in strict mode if there's no variable in scope named foo.