Skip to content

Instantly share code, notes, and snippets.

@tanglebones
Created July 10, 2013 20:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save tanglebones/5969802 to your computer and use it in GitHub Desktop.
Bad Code: Needless if
// do not write:
if (!expr)
{
return false;
}
return true;
// instead of
return expr;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment