Created
July 16, 2019 19:07
-
-
Save deleteman/3edd170f77d816e8e046de1493f8d749 to your computer and use it in GitHub Desktop.
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
function isItDone(a) { | |
console.log("fn called!") | |
return a < 10 | |
} | |
for(let a = 0; isItDone(a); a++) { | |
console.log(a) | |
} | |
/* | |
fn called! | |
0 | |
fn called! | |
1 | |
fn called! | |
2 | |
fn called! | |
3 | |
fn called! | |
4 | |
fn called! | |
5 | |
fn called! | |
6 | |
fn called! | |
7 | |
fn called! | |
8 | |
fn called! | |
9 | |
fn called! | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment