A very simple rule - if line starts with '[' or '(', put semicolon before. Thats it.
Personally, if all is encapsulated inside self executing function, i put one semicolon before and one after it.
Personally, if all is encapsulated inside self executing function, i put one semicolon before and one after it.
function v(x) {
return
x;
}
v("yeah");
returns undefinedNewline matters / doesn't matter, the same with the semicolons.