.then()

noun

say it: “THEN” /ðɛn/

The Promise method that runs a function once the promise succeeds.

What does .then() do in JavaScript?

.then() — A Promise method that schedules work for successful completion.

orderReady.then(status => {
    updateStatus(status);
});

In a sentence

  • “fetch(url).then(r => r.json()) reads the body once the response arrives.”

Level: Journeyman · More JavaScript terms at this level

Updated