r/javascript • • Feb 05 '11

Are Semicolons Necessary in JavaScript?

http://aresemicolonsnecessaryinjavascript.com/
0 Upvotes

66 comments sorted by

View all comments

3

u/[deleted] Feb 06 '11

Try coding VB.NET for a few months and then going back to PHP etc and your code is so crap and you wonder why it won't compile. Oh missed 5 semicolons. It takes weeks to get back into the habit of rembering to use semicolons again. I can imagine if you start leaving them out in JS while you're doing PHP or CSS your code will start erroring out due to forgetting the semicolons. Keep it consistent throughout the site.