Skip to content

Instantly share code, notes, and snippets.

@quentinchap
Created January 8, 2019 17:50
Show Gist options
  • Save quentinchap/3d9a922965464904d3dd43c36aaa6f7a to your computer and use it in GitHub Desktop.
Save quentinchap/3d9a922965464904d3dd43c36aaa6f7a to your computer and use it in GitHub Desktop.
let promise1 = new Promise((resolve, reject) =>
resolve('Success!');
//reject('error');
);
promise1.then(res =>
alert(result);
}, function (err) {
alert(err);
}
);)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment