Created
November 10, 2014 06:40
-
-
Save stoeffel/017fe78df200f5e5c1db to your computer and use it in GitHub Desktop.
// source http://jsbin.com/kalezo
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
function one() { | |
var hasCake = true; | |
// some code here | |
two(); | |
function two() { | |
if (hasCake) { | |
console.log("Yummie"); | |
} else { | |
console.log("The cake is a lie."); | |
} | |
var hasCake = false; | |
if (hasCake) { | |
console.log("mmh.."); | |
} else { | |
console.log("No cake for you."); | |
} | |
} | |
} | |
one(); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">function one() { | |
var hasCake = true; | |
// some code here | |
two(); | |
function two() { | |
if (hasCake) { | |
console.log("Yummie"); | |
} else { | |
console.log("The cake is a lie."); | |
} | |
var hasCake = false; | |
if (hasCake) { | |
console.log("mmh.."); | |
} else { | |
console.log("No cake for you."); | |
} | |
} | |
} | |
one(); | |
</script></body> | |
</html> |
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
function one() { | |
var hasCake = true; | |
// some code here | |
two(); | |
function two() { | |
if (hasCake) { | |
console.log("Yummie"); | |
} else { | |
console.log("The cake is a lie."); | |
} | |
var hasCake = false; | |
if (hasCake) { | |
console.log("mmh.."); | |
} else { | |
console.log("No cake for you."); | |
} | |
} | |
} | |
one(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment