Created
July 22, 2017 21:16
-
-
Save theharveyz/e4d251bf22dcd2050bd0cf35a2364fcb to your computer and use it in GitHub Desktop.
js测试例子
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
setTimeout(function(){ | |
console.log("timeout") | |
}, 0); | |
setImmediate(function(){ | |
console.log("immediate") | |
}); | |
process.nextTick(function(){ | |
console.log('next tick') | |
}); | |
// output: | |
//╰─$ node test.js | |
//next tick | |
//timeout | |
//immediate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment