PRoMises chaining
const wait = function (second) {
return new Promise(function (resolve) {
setTimeout(resolve("WHo??"), second * 1000);
});
};
wait(1)
.then((r) => {
console.log("I am a first call");
console.log(r);
return wait(3);
})
.then(...
mohitv02.hashnode.dev1 min read