console.log('Start'); // 1
setTimeout(() => {
console.log('setTimeout 1'); // 8
}, 0);
setTimeout(() => {
console.log('setTimeout 2'); // 9
}, 0);
Promise.resolve().then(() => {
console.log('Promise 1'); // 4
}).then(() => {
console.log('Promise 2'); // 6
});
async function asyncFunc() {
console.log('Async Function Start'); // 2
await Promise.resolve().then(() => {
console.log('Promise in Async'); // 5
});
console.log('Async Function End'); //7
asyncFunc(); // Calls the async function
console.log('End'); //3
To embed this project on your website, copy the following code and paste it into your website's HTML: