Created
November 27, 2012 06:15
-
-
Save patrickomeara/4152678 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/* | |
* long way | |
* "false" could be replaced with anything that returns false ie | |
* 10 < 5, 0, -1, 5-8 | |
*/ | |
if(false) | |
console.log("I am right"); | |
else | |
console.log("I am wrong"); | |
//shorthand | |
console.log(false?"I am right":"I am wrong"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment