4 ms·
Suggestion: Change this behaviour in the next version of JavaScript to not automatically "turning the previous newline into a semicolon", but instead throw a pa
by JoelJacobson 10y ago
Suggestion: Change this behaviour in the next version of JavaScript to not automatically "turning the previous newline into a semicolon", but instead throw a parser error to the developer. Perhaps there is a way to enforce this in modern browsers? I don't know anything about JavaScript to be honest.
- neilsimp1 10y agoI think the reason that it's still left in is for backwards compatibility. You wouldn't want a browser to update this and instantly break a bunch of older sites.
- ksherlock 10y ago"use semicolons";
- bananicorn 10y agoYes, "use strict"; is already there for that - for anyone who is wondering: https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Strict_mode https://developer.mozilla.org/de/docs/Web/JavaScript/Referen...