I tested this code and the result I expected was getting the Chicken log first, but I was wrong, everytime I run this code I get the Egg log first, does anybody knows whats going on here?
setTimeout(() => {
console.log("Egg");
}, 1);
setTimeout(() => {
console.log("Chicken");
}, 0);
Edit: Notice that this behaves differently if those delays are 101ms and 100ms respectively, so the behavior changes even if the difference on the timer is still 1ms