javascript
JS Snippet
new Promise((resolve, reject) => {
// asynchronous operation
// then in case of success
resolve();
// or
reject("failure reason");
});
Was this helpful?
Similar Posts