Created
May 14, 2014 21:13
-
-
Save carlosrojaso/52a1be98b29f29444942 to your computer and use it in GitHub Desktop.
JS Flow
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
// Flow control | |
var foo = true; | |
var bar = false; | |
if ( bar ) { | |
// This code will never run. | |
console.log( "hello!" ); | |
} | |
if ( bar ) { | |
// This code won't run. | |
} else { | |
if ( foo ) { | |
// This code will run. | |
} else { | |
// This code would run if foo and bar were both false. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment