new Promise((resolve, reject) => { // Do some work // then in case of success resolve(); // or reject("failure reason"); });