You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{ should be at the end of the relevant line, not on a new line
opening parenthesis after a control statement should not be preceded by a space -
if( (good), for( (good), while( (good), if ( (bad), etc.
always indent the contents of a switch statement, and likewise always indent the contents of
each case unless it is a one-liner (which is totally fine);
prefer breaking/returning early over complicated if/else chains
prefer for(;;) { for infinite loops
indent one space after // when commenting (// example comment)
prefer // over multi-line comment syntax (looks better)
prefer no blank lines within functions, but acceptable if things get crazy
prefer one-line if/while/etc statements when possible
prefer two-line if/else when possible
separate functions and classes with a single blank line