Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tonylukasavage
Created October 28, 2014 19:33
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 tonylukasavage/b51477d7a45b061c0767 to your computer and use it in GitHub Desktop.
Save tonylukasavage/b51477d7a45b061c0767 to your computer and use it in GitHub Desktop.
open brace on next line
if (val === 'sdfdsfsdf' ||
val === 'sdfsdfsfsf' ||
val > 23423423 ||
val < 123)
{
// I like the open brace on a new line _only_ in this situation
// so that there's a clear distinction between the end of the
// multi-line conditional and the beginning of the code
}
if (val === 'sdfdsfsdf' ||
val === 'sdfsdfsfsf' ||
val > 23423423 ||
val < 123) {
// the code here lines up with the multi-line conditional, making
// it difficult at a glance to see where the conditional ends and
// where the code within it begins.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment