These are some Node JS discussion questions to deepen your understanding of NodeJS
- Differentiate between JavaScript and Node.js.
- Why Node.js is single threaded?
- How do Node.js works?
- What is package.json?
- What is an Event loop in Node.js and how does it work?
Differentiate between JavaScript and Node.js.
Javascript is a front-end development env
and node js is a server-side development env
Why Node.js is single-threaded?
because it is a none blocking-language
so it does not need multi-thread
How do Node.js works?
first, the event loop takes the user request, and then,
register a callback in the queue and after the operation is completed,
it will trigger the registered callback
What is package.json?
basically, it is a JSON based file that registers all our project dependencies
What is an Event loop in Node.js and how does it work?
the event loop is the connection between the Event queue and thread Pool
and it takes the requests from the user and adds them to the event queue then after the operation is complete