Given a set of instructions in javascript, guess the output of the given code snippet. It will have promises, setTimeout(), setInterval() and other asynchronous APIs of javascript
Click to reveal
Does having a timer value less in the setTimeout affect the execution of the code? Which one gets executed first, a setTimeout() with 100ms timeout value or a setTimeout() with 0ms timeout value?
Click to reveal
Which one gets executed first, a Promise or a Web API like setTimeout()? Which has the higher priority? A microtask queue or a Web API queue?