Games Node.js Loop Quest Round the loop
Timeout or immediate?
setTimeout(0) and setImmediate in the main script. Careful: this is a trick question.
setTimeout(() => console.log('timeout'), 0);setImmediate(() => console.log('immediate'));1. Predict the output
Tap the lines in the order you think they print.
- 1…
- 2…