Is the top-level code always executed first in Javascript even if we have a timer at 0 seconds?
Meaning, even if the timer is finished at 0s and the callback is added in the callback queue at 0s, the code after that timer runs before the timer shows results. If we run this below snippet, the result order is: "First" "second" "Timeout"
console.log('First');
setTimeout(()=> console.log('Timeout'), 0);
console.log('second')
Why is that?