Created
June 20, 2016 07:13
-
-
Save ksakae1216/afd3928100195fe4bfe2d3e424062862 to your computer and use it in GitHub Desktop.
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 foo(i) { | |
if (i < 0) | |
return; | |
console.log('begin:' + i); | |
foo(i - 1); | |
console.log('end:' + i); | |
} | |
foo(3); | |
// 出力内容 | |
// begin:3 | |
// begin:2 | |
// begin:1 | |
// begin:0 | |
// end:0 | |
// end:1 | |
// end:2 | |
// end:3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment