let resolve, reject;
const promise = new Promise((res, rej) => {
resolve = res;
reject = rej;
});
This demonstrates the external Promise resolution pattern: 1) Allows controlling Promise resolution from outside the executor, 2) Useful for creating Promises that represent external events, 3) Common in implementing custom event handling systems, 4) Enables creating Promises that can be resolved by any code with access to resolve/reject, 5) Useful for converting callback-based APIs to Promises, 6) Must be used carefully to maintain Promise control flow.