Created
March 22, 2012 13:37
-
-
Save davestewart/2158378 to your computer and use it in GitHub Desktop.
Multi-line nested ternary operators
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var uri = folder instanceof URI | |
? folder.uri | |
: folder instanceof Folder | |
? folder.uri | |
: typeof folder === 'string' | |
? URI.toURI(folder, 1) | |
:null; | |
if(uri) | |
{ | |
// do something | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment