Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 1.59 KB

File metadata and controls

20 lines (17 loc) · 1.59 KB

Promise Resolution Order easy #javascript #promises

by Pawan Kumar @jsartisan

Take the Challenge

What will be the order of following code:

new Promise((resolve, reject) => {
  resolve(1);
  resolve(2);
  reject("error");
}).then(
  (value) => {
    console.log(value);
  },
  (error) => {
    console.log("error");
  },
);

Back Share your Solutions Check out Solutions