Skip to content

Instantly share code, notes, and snippets.

@FireyFly
Created December 4, 2012 16:00
Show Gist options
  • Save FireyFly/4205496 to your computer and use it in GitHub Desktop.
Save FireyFly/4205496 to your computer and use it in GitHub Desktop.
nested ternary formatting
function foo(bar) {
return bar === baz? 'hello'
: bar === quux? 'hey'
: /*otherwise*/ 'hi'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment