Variables

String literals

Functions

// prefer this
const bar = (foo) => {  
  return 0;
};

// over this
function baz(foo) {
  return 0;
}

Semicolons

Indentation

Functions () and {}

if () {
  // etc
}

Miscellaneous

// have one space between operators and operands
const a = 1 + 3 * sqrt(4);

// start the else on a new line
// add spaces between keywords and the open parenthesis
if (true) {
  // don't add a space between the identifier and the open parenthesis
  bar();
}
else {
  baz();
}