Created
December 24, 2018 07:22
-
-
Save Bloofer/75117194d84dff6cfe8f6b703d84b60e to your computer and use it in GitHub Desktop.
lone line example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bad Idea | |
// hard to follow | |
if (x && y && myFunctionThatReturnsBool() && caseNumber3 && (15 > 12 || 2 < 3)) { | |
} | |
// Good Idea | |
// Logical grouping, easier to read | |
if (x && y && myFunctionThatReturnsBool() | |
&& caseNumber3 | |
&& (15 > 12 || 2 < 3)) { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment