How does multi-threading or async code in JavaScript work?

Viewed 1293

I am no beginner in javascript. I am actually working on this for past 3-4 months but today I read this statement about "What is JavaScript?"

JavaScript is single-threaded, non-blocking, asynchronous, concurrent language.

and I was lost. If JavaScript is single-threaded, how can it be concurrent and how can it be asynchronous because you need to keep track what your async code is doing and without another thread, it is impossible to track 2 or more code at a same time?

3 Answers
Related