1. Semicolons, you're out!

    Lately I have been exploring Node, which means writing JavaScript code. To help detect errors and inconsistent code I decided to try JSHint. That means going through the configuration options to decide which checks to include.

    This forced me to think about the rules I consider valid for my code. For most options that's an easy decision. Prefer spaces (4) over Tabs for indentation. Opening braces go on the same line as the opening statement. Yes, please check my code for unused variables.

    But what about semicolons?

    Apart from JavaScript I also write Java and PHP code so without much thought I always included semicolons. Just to have a single coding style in all of these languages.

    This time I did some investigation and after reading this article decided to switch and leave out the semicolons.

    I like clean code. For example, when I first saw Python code I immediately liked the use of indentation to define a block of code. No fights about where to put braces or whether or not to omit them around single statement blocks. Just clean, consistent code by using whitespace. Brilliant!

    By leaving the semicolons out where possible I hope to make my JavaScript code a little bit cleaner. What do you think?