async function asyncFn() { console.log('asyncFn start'); // 2 await Promise.resolve(); // микро 2 console.log('asyncFn finish'); // 4 } function fn() { console.log('hello'); // 1 setTimeout(function() { console.log('setTimeout1'); // макро 1 // 6 }, 0); new Promise(function(resolve) { resolve(); }).then(function() { console.log('then1'); // микро 1 }).then(function() { console.log('then2'); // микро 3 // 5 }); asyncFn() console.log('bye'); // 3 } fn(); // ============== setTimeout(() => console.log('setTimeout'), 0); //макро 1 function myAsync(start = 0) { console.log(start); return Promise.resolve(start + 1).then(myAsync); } myAsync(); // 0, 1, ..., n, ... /* == 200 OK - server 1. parse HTML