2 ms·
JavaScript's problem isn't that you can choose whether or not to use semicolons, it's that they're automatically put in for you if you omit them. http://lucumr
by joeyespo 14y ago
JavaScript's problem isn't that you can choose whether or not to use semicolons, it's that they're automatically put in for you if you omit them.
http://lucumr.pocoo.org/2011/2/6/automatic-semicolon-insertion/ http://lucumr.pocoo.org/2011/2/6/automatic-semicolon-inserti...
Technically, Python is a much better example of optional semicolons since you can use them and they're not required. Of course, the real reason they exist is for compound statements.
http://stackoverflow.com/questions/8236380/why-is-semicolon-allowed-in-this-python-snippet http://stackoverflow.com/questions/8236380/why-is-semicolon-...