Notice that we’ve been using the term, fulfilled instead of resolved, and the reason is that a promise can be resolved to another promise and which point its fate becomes dependent on the other promise. If the other promise gets fulfilled our promise gets fulfilled, if the other promise is rejected, our promise gets rejected.
Both alpha and beta are resolved, but they settle to different fates. Alpha gets fulfilled, Beta gets rejected.
const delayFulfill =
() => new Promise(
res => setTimeout(() => res('fulfilled'), 1000)
);