JavaScript Semicolon Insertion | Everything you need to know

JavaScript Semicolon Insertion | Everything you need to know

Should you omit optional semicolons or not? The answer is a matter of personal preference, but should be made on the basis of informed choice rather than nebulous fears of unknown syntactical traps or nonexistent browser bugs. If you remember the rules given here, you are equipped to make your own choices, and to read any JavaScript easily.