3 ms·
Repeat after me: Semicolons are not optional in JavaScript. ASI is an error correction mechanism, not a language feature. You can also do things like not using
by russellbeattie 5y ago
Repeat after me: Semicolons are not optional in JavaScript.
ASI is an error correction mechanism, not a language feature. You can also do things like not using the var keyword when declaring variables or something like a = 2 < "4"; and it'll work fine. But you don't because they're all errors.