Skip to content

Instantly share code, notes, and snippets.

@fooyeahcode
Created August 16, 2010 11:10
Show Gist options
  • Save fooyeahcode/526796 to your computer and use it in GitHub Desktop.
Save fooyeahcode/526796 to your computer and use it in GitHub Desktop.
// instead of this:
if( foo ) {
if( bar ) {
doSomething();
} else {
errorHandling();
}
} else {
errorHandling();
}
// do this:
if( !foo || !bar ) {
errorHandling();
}
doSomething();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment