Skip to content

Instantly share code, notes, and snippets.

@verkholantsev
Created June 10, 2015 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save verkholantsev/4246751263ec45ecdc27 to your computer and use it in GitHub Desktop.
Save verkholantsev/4246751263ec45ecdc27 to your computer and use it in GitHub Desktop.
// First
condition && firstStatement()
// Goes to
if (conditon) {
firstStatement();
secondStatement();
}
// With
// - condition && firstStatement()
// + if (conditon) {
// + firstStatement();
// + secondStatement();
// + }
// Second
if (conditon) {
firstStatement();
}
// Goes to
if (conditon) {
firstStatement();
secondStatement();
}
// With
// if (conditon) {
// firstStatement();
// + secondStatement();
// }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment