return then javascript

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

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});