Skip to content

Instantly share code, notes, and snippets.

@stoeffel
Created November 10, 2014 06:40
Show Gist options
  • Save stoeffel/017fe78df200f5e5c1db to your computer and use it in GitHub Desktop.
Save stoeffel/017fe78df200f5e5c1db to your computer and use it in GitHub Desktop.
<!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>
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