Skip to content

Instantly share code, notes, and snippets.

@korzio
Created May 16, 2020 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save korzio/953277c80545930fdfe1e943f7f57699 to your computer and use it in GitHub Desktop.
Save korzio/953277c80545930fdfe1e943f7f57699 to your computer and use it in GitHub Desktop.
const fs = require('fs')
setTimeout(() => console.log('timeout out'))
setImmediate(() => console.log('immediate out'))
fs.readFile('./events.js', () => {
console.log('fs')
process.nextTick(() => console.log('next in'))
setTimeout(() => console.log('timeout in'))
setImmediate(() => console.log('immediate in'))
})
const next = () => {
console.log('next')
}
process.nextTick(next)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment