return then javascript

Solutions on MaxInterview for return then javascript by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "return then javascript"
Prune
18 Oct 2017
1const promise1 = new Promise((resolve, reject) => {
2  resolve('Success!');
3});
4
5promise1.then((value) => {
6  console.log(value);
7  // expected output: "Success!"
8});