Promise

Promise()

new Promise(executor)
Promise() コンストラクター - JavaScript | MDN

then()

Promiseの最終的な完了のために、コールバック関数を予定できます。

then(onFulfilled, onRejected)
Promise.prototype.then() - JavaScript | MDN

Promiseが履行 (fulfilled) されたときにはonFulfilledが、拒否 (rejected) されたときにはonRejectedが非同期に呼び出されます。

呼び出し後、すぐに新しいPromiseが返されます。

const promise = new Promise((resolve, reject) => {
    resolve('SUCCESS');
    reject('ERROR');
});

promise.then(
    (value) => { console.log(value); }, // 'SUCCESS' と出力
    (reason) => { console.error(reason); });

onFulfilledonRejectedは一方しか呼ばれないため、この例ではonFulfilledが呼ばれているためonRejectedは呼ばれません。

onRejectedは、例外が投げられたときにも呼ばれます。

const promise = new Promise((resolve, reject) => {
    throw new Error('EXCEPTION');
});

promise.then(
    (value) => { console.log(value); },
    (reason) => { console.error(reason); }); // 'Error: EXCEPTION' と出力

catch()

Promiseが拒否されたときの関数を予定できます。これはPromise.prototype.then(undefined, onRejected)のショートカットです。

promiseInstance.catch(onRejected)
Promise.prototype.catch() - JavaScript | MDN
const promise = new Promise((resolve, reject) => {
    throw new Error('EXCEPTION');
});

promise
    .then((value) => { console.log(value); })
    .catch((value) => { console.error(value); });

async/await

async/awaitを用いるとthen()でコールバック関数を予定する処理、

promise.then((value) => { console.log(value); });

を、次のように記述できます。

async function func() {
    const value = await promise;
    console.log(value);
}

func();
連鎖 - プロミスの使用 - JavaScript | MDN
JavaScriptのドキュメントから検索