In C type languages, such as C, C++, Java and C#, whether the curly brace starts on the same line or on a new line is basically a matter of convention.
However in JavaScript it does make a difference due to a feature of JavaScript called the “implicit semicolon”, If a statement doesn’t end in a semicolon then JavaScript interpreters will add one.
Oct
27
2015