Why should I use a semicolon after every function in javascript?
Semicolons after function declarations are not necessary. The grammar of a FunctionDeclaration is described in the specification as this: function Identifier ( FormalParameterListopt ) { FunctionBody } There’s no semicolon grammatically required, but might wonder why? Semicolons serve to separate statements from each other, and a FunctionDeclaration is not a statement. FunctionDeclarations are evaluated before … Read more