Promises represent the eventual completion (or failure) of an asynchronous operation.
Source Code
new Promise((resolve, reject) => {
// Asynchronous operation
resolve('Success');
})
.then(result => console.log(result))
.catch(error => console.error(error));