A quick introduction to parallelism in JavaScript

Parallelism in JavaScript? you might be thinking that we are already doing parallel programming in JavaScript using setTimeout(), setInterval(), XMLHttpRequest, async/await and event handlers. But that’s just not true. As developers, we have been mimicking parallel programming because of JavaScript’s single threading nature using event loop. Yes, all of the above techniques are asynchronous and non-blocking. But, […]

Parallelism in JavaScript? you might be thinking that we are already doing parallel programming in JavaScript using setTimeout(), setInterval(), XMLHttpRequest, async/await and event handlers. But that’s just not true. As developers, we have been mimicking parallel programming because of JavaScript’s single threading nature using event loop.
Yes, all of the above techniques are asynchronous and non-blocking. But, that doesn’t necessarily mean parallel programming. JavaScript’s asynchronous events are processed after the currently executing script has yielded.
Source: Codemancers