What will be the output of the following code?
const promise = new Promise((resolve, reject) => {
resolve('Success!');
});
promise.finally(() => {
console.log('Finally block executed!');
}).then((result) => {
console.log(result);
});
What will be the output of the following code?
const promise = new Promise((resolve, reject) => {
resolve('Success!');
});
promise.finally(() => {
console.log('Finally block executed!');
}).then((result) => {
console.log(result);
});