Monday, November 12, 2018

JavaScript Event Loop Explained

JavaScript Event Loop Explained

Now for the long answer, let me try through 2 sample code snippets. Here we have the main function which has 2 console.log commands logging ‘A’ and ‘C’ to the console. Sandwiched between them is a setTimeout call which logs ‘B’ to the console with 0ms wait time.

No comments:


JavaScript bloat is a more real problem today than it ever was. Bundlephobia lets you understand the performance cost of adding a npm pack...