IS JavaScript is Single-Threaded or Multi-threaded language

Anish sharmaAnish sharma
1 min read

Before talking about the JavaScript is single-threaded or multi-threaded Language , Let us the understand about the single-threaded language and multi-threaded language

Single-threaded Language :- In single threaded language the code is executed line by line . It means that the language has to execute the current code and then it can move to the next line. Single threaded language has one call Stack and one Memory Heap

Multi-Threaded Language:- In Multi threaded languages, in the single process multi task can be executed , it does not follow the patterns like single-threaded Language

Coming to the question is JavaScript is Single-Threaded Or Multi-threaded

There is lot of confusion about this topic some developers assume the JavaScript as multi-threaded because of its asynchronous ,non-blocking behaviour, But JavaScript is Single-threaded language, As it follows the rule of executing the code in order.

1
Subscribe to my newsletter

Read articles from Anish sharma directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Anish sharma
Anish sharma