Skip to content

Instantly share code, notes, and snippets.

@ahstro
Created October 21, 2016 11:16
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 ahstro/75bb49fad2e3dec6a163b1192e8d9fd5 to your computer and use it in GitHub Desktop.
Save ahstro/75bb49fad2e3dec6a163b1192e8d9fd5 to your computer and use it in GitHub Desktop.
/* *
* Separate variable declarations when variables are independent
*
* Allows easy reordering by moving whole lines without thinking about commas
* */
const foo = 1
const bar = 2
/* *
* Comma-first declarations when subsequent variables depend on the former
*
* Makes it obvious that declarations are order-specific, limiting
* accidental breakage by reordering, but still keeps reordering
* easy since the delimiter and the delimited content is on the same line
* */
const oob = 4
, far = oob + 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment