const work = () => {
return new Promise(resolve => {
setTimeout(() => resolve('doing work'), 3000);
})
};
console.log('before');
work().then(e => {
console.log(e);
})
console.log('after');
To embed this project on your website, copy the following code and paste it into your website's HTML: