DEV Community

Discussion on: Essential Concepts in JS

Collapse
 
vladmel1234 profile image
vlad melnik

Hey, NodeJS is not JavaScript, it is environment to run javascript, and JS is single threaded because it runs in a single thread provided by this env.
And the not single threaded part of Nodejs is C++ part

Collapse
 
aritik profile image
Ritik Ambadi

You're right Vlad. The underlying C++ part is multi-threaded. The NodeJS part is single-threaded and I think the intention is for NodeJS developers to write code in a single-threaded manner.

For anybody , who wants to understand these concepts in detail , I used Stephen Grider's Advanced NodeJS course on Udemy.

udemy.com/course/advanced-node-for...

Collapse
 
jcubic profile image
Jakub T. Jankiewicz

You're not correct, JavaScript is not single threaded, the environment is single threaded. The way the language is implemented. The same way JavaScript is not asynchronous that is provided by environment (browser or NodeJS). Environment is not part of the language.

Collapse
 
mohamed24awwad profile image
M.Awwad

In addition to that NodeJS is just a referable variables to the C++ modules and functions.