Code Snippet
const thenable = {
then(resolve) {
console.log("adopt");
resolve(7);
}
};
Promise.resolve(thenable).then(value => console.log(value));
queueMicrotask(() => console.log("microtask"));
console.log("sync");
Expected Output & Explanation
sync
adopt
microtask
7
The thenable’s then method runs in an adoption job. Fulfilling the promise there queues the reaction after the already queued microtask.
Module Context & References
Personal Notes · Markdown
Technologies & Interview Topics Covered
Switch between short-term interview tracks and long-term 80/20 engineering depth to
practice JavaScript internals, React rendering and hooks, timed frontend machine
coding UI challenges, MeetaPro FG300, Blind 75 & NeetCode 150 DSA patterns,
Python & FastAPI APIs, PostgreSQL query optimization & MVCC, Redis caching,
Applied AI RAG pipelines & evaluations, and distributed system design.