Created
July 4, 2018 15:06
-
-
Save luojiyin1987/24a1c47a5a31fd1109eec9551692bcdb to your computer and use it in GitHub Desktop.
#TickFn #callback
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
| let anotherTickFn = x => { | |
| console.log('async', x); | |
| if (x < 10){ | |
| process.nextTick(() => { | |
| anotherTickFn(x + 1); | |
| }); | |
| } | |
| } | |
| console.log('=== start async ==='); | |
| anotherTickFn(1); | |
| console.log('=== end async ==='); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment