Last active
August 29, 2015 14:25
-
-
Save umamichi/2b7b1b64494c4fc5023c to your computer and use it in GitHub Desktop.
Javascript Question
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 i = 1; | |
function log(){ | |
console.log(i); | |
i++; | |
if(i > 100){ | |
return false; | |
} | |
log(); | |
} | |
log(); |
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 i = 1; | |
function log(){ | |
console.log(i); | |
i++; | |
switch(i){ | |
case 101: return false; | |
} | |
log(); | |
} | |
log(); |
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 log(i){ | |
console.log(i); | |
switch(i+1){ | |
case 101: return false; | |
} | |
log(i+1); | |
} | |
log(1); |
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 log(i){ | |
switch(i+1){ | |
case 101: return false; | |
default : console.log(i+1);log(i+1); | |
} | |
})(1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment