What the heck is the event loop anyway?

Recently, I have watched a valuable presentation about JavaScript's event loop. JavaScript is a one-threaded synchronous language. Keeping that in mind, have you wondered why some functions seem asynchronous? Why does setTimeout(0) help so many times? How to avoid browser's freezing?

event loopRecently, I have watched a valuable presentation about JavaScript's event loop. JavaScript is a one-threaded synchronous language. Keeping that in mind, have you wondered why some functions seem asynchronous? Why does setTimeout(0) help so many times? How to avoid browser's freezing? You will find answers to those questions in this short video.