A promise executor is the callback passed to the Promise constructor. It runs immediately when the promise is created and receives resolve and reject functions, which control how the promise settles. section 8.1.1
const promise = new Promise((resolve, reject) => {
// code that calls resolve or reject eventually...
});
The constructor syntax shows the executor receiving resolve and reject. section 8.1.1
Calling resolve with a normal value fulfills the promise; calling reject or throwing from the executor rejects it. A promise settles only once. Resolving with a thenable makes the promise follow that thenable’s outcome. section 8.1.1
