We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/nodejs/nodejs.org/edit/main/pages/en/learn/asynchronous-work/understanding-setimmediate.md
I've tried to execute the code from the page several times on Node.js 18 and 20 but have got the save result
start bar foo zoo baz
Why it is not the same as in documentation?
const baz = () => console.log('baz'); const foo = () => console.log('foo'); const zoo = () => console.log('zoo'); const start = () => { console.log('start'); setImmediate(baz); new Promise((resolve, reject) => { resolve('bar'); }).then(resolve => { console.log(resolve); process.nextTick(zoo); }); process.nextTick(foo); }; start(); // start foo bar zoo baz
The text was updated successfully, but these errors were encountered:
The document is run in CommonJS and your result seems like run in ESM.
CommonJS
ESM
Sorry, something went wrong.
Yep, you are right.
No branches or pull requests
Affected URL(s)
https://github.com/nodejs/nodejs.org/edit/main/pages/en/learn/asynchronous-work/understanding-setimmediate.md
Description of the problem
I've tried to execute the code from the page several times on Node.js 18 and 20 but have got the save result
Why it is not the same as in documentation?
The text was updated successfully, but these errors were encountered: