How Event Loop can get trickier

Try running the following JavaScript code in your browser, NodeJS, see what the output is. Are they consistent?

setTimeout(() => console.log("I love "), 1);

setTimeout(() => console.log("CSC309"), 0);

Leave a Reply

Your email address will not be published. Required fields are marked *