JavaScript Microtasks

2021 VietMX 0

Promise handlers .then/.catch/.finally are always asynchronous. Even when a Promise is immediately resolved, the code on the lines below .then/.catch/.finally will still execute before these handlers. Here’s a demo: If […]