Do you know what will be the output of this code?
JavaScript
setTimeout(() => console.log("A"), 100);
setTimeout(() => console.log("B"), 0);
setTimeout(() => console.log("C"), 10);
Show answer and explanation
The answer is B C A.
Each callback is queued once its delay has passed, so the shortest delay runs first. The delay is a minimum, not a guarantee.