15

Call me a semi-colon nazi, but javascript looks naked without those characters!

Comments
  • 0
    Agree 100%. Plus in the case of JavaScript it's not really optional. It's just that the interpreter has to pretend it's there.
  • 0
    I've always wondered; how does that work? Why has it to pretend they are there even if they aren't and not the other way around? What's the benefit? what does "pretending they are there" even mean?
  • 1
    http://stackoverflow.com/a/2846298 - a quick explanation on automatic semicolon insertion.
  • 0
    @Lalike1987 thanks, this made it clear.
  • 0
    I was in the same boat. I wanted to be very explicit about how and when my statements ended. But then I started at a new company who's style guide required ASI style (automatic semicolon insertion) and I've got to say, I've learned to love it. Plus I've learned the real structure of a JavaScript statement. Try it out for a week or two, get a linter to help you.
  • 0
    to be completely honest if you really think about it ..... it is naked......
Add Comment