04.iii Promise.finally()
promise
.then(result => {···})
.catch(error => {···})
.finally(() => {···});promise.finally(() => {
«statements»
});
// Is equal to:
promise.then(
result => {
«statements»
return result;
},
error => {
«statements»
throw error;
}
);Last updated