What will be the output of the following code?
const promise = new Promise((resolve, reject) => {
setTimeout(() => {
resolve('Resolved');
}, 2000);
});
promise
.then((result) => {
console.log(result);
return Promise.reject(new Error('Error'));
})
.catch((error) => {
console.log(error.message);
});