Understanding the JavaScript Event Loop

For the longest time, I treated the JavaScript event loop like a black box. I knew it setTimeout didn't block; I knew promises were…