-
Notifications
You must be signed in to change notification settings - Fork 0
How asynchronous JavaScript works under the hood
Daisho Komiyama edited this page Jul 25, 2019
·
12 revisions
Hi, Today, I watched an amazing tutorial video about JavaScript asynchronous feature and learned how it works under the hood.
function printHello () {
console.log('Hello');
}
function blockFor1Sec () {
//assume looping on huge array and it takes approximately 1 second to complete
}
setTimeout(printHello, 0);
blockFor1Sec();
console.log('Me first!');