Code Style Tips

When you write if/else statements please put your else block on a new line not on the same line. The following doesn’t work with certain editor for code block collapsing.

if(x==1){ 
    console.log("Blah");
} else {
    console.log("bah");
}

Do the following instead.

if (x == 1) 
{
    console.log("Blah");
} 
else 
{
    console.log("bah");
}

OR

if (x == 1) {
    console.log("Blah");
} 
else {
    console.log("bah");
}

The second way allows those of us who use code collapse features inside of editors to collapse each part of the if/else. Thanks.