Created
April 21, 2016 08:54
-
-
Save clonn/1549d32d941e281c86bd5ad4c14d4b27 to your computer and use it in GitHub Desktop.
test for loop and return
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
var s= 10; | |
for(var i=0; i<=s; i++) { | |
console.log('run' + i); | |
try { | |
if (i===1) { return console.log('run end');} | |
} catch(e) { | |
return e; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment