Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const fs = require('fs');
fs.readFile('hello.txt', () => {
setTimeout(() => {
console.log('timeout')
}, 0);
setImmediate(() => {
console.log('immediate')
});
});
// output
// immediate
// timeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.