Jul 30, 2017 · 1 min read
Writing semicolons everywhere will not help you from mistakes like adding a new line after return statement. ASI will still kick in and you’ll get undefined returned from the function.
It’s ironic that it’s actually the other way around: the most common misconception about JavaScript is that semicolons are required. It’s not a mistake not to use them, if you know how and when ASI takes place… which comes down to “don’t start your lines with (, [, / or a unary operator” — which is a terrible practice anyway.
