Kevin Powell - CommunityKP-C
Kevin Powell - Community6mo ago
38 replies
bfmv

help with asynchronous javascript

let promise = new Promise(function(resolve, reject){
 setTimeout(()=> resolve("done"), 1500)
})
console.log(promise)
});


why when i run this and check the console, and click the promise object before 1.5second, it stays pending forever, but if i click the promise object after 1.5 seconds, it fulfilled
Was this page helpful?