Skip to content

Instantly share code, notes, and snippets.

@coverslide
Created January 3, 2013 22:58
Show Gist options
  • Save coverslide/4448286 to your computer and use it in GitHub Desktop.
Save coverslide/4448286 to your computer and use it in GitHub Desktop.
Multi-line ternary example
var age_group = age > 70 ? 'se' :
age > 60 ? 'si' :
age > 50 ? 'fi' :
age > 40 ? 'fo' :
age > 30 ? 'th' :
age > 20 ? 'tw' :
'un';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment