1

I have read that JavaScript is a single-threaded programming language. If I understand correctly, what that essentially means is that I can’t spawn threads to create multi-threaded applications. I am more of a technical writer than a programmer, so that's as far as my capacity to explain this concept allows me.

However, whether that is the Web or Node running on a server, it is very possible to do asynchronous operations, like listening to a button touch events or reading a file without affecting the UI flow and responsiveness of your application. I have also heard to my despair the term of non-blocking in the context of Node JS, which seems to imply that there are multiple threads in execution preventing the system from blocking. Clearly I am misunderstanding something.

To the question, how is it that JavaScript being a single-threaded programming language is able to do asynchronous operations? Aren’t those multi-threaded?

I am looking forward to your eye-opener answers.

Ferris W.
  • 11
  • 1

0 Answers0