Nowadays JavaScript is on hype and NodeJS as well. But we should not learn any technology because of it's trend but first understand the core of that technology.
What is NodeJs ?
In the past years, we believe that JavaScript can only used in browser but that is not true. JavaScript runs on browser's engine which compiles it and gives us the output.
So a developer Ryan Dahl came up with an idea to run the JavaScript outside the browser and developed NodeJs.
Chrome uses V8 engine to run JavaScript in browser so for developing NodeJs that engine is used.
While surfing on the net, you can find the definition of NodeJs is like an asynchronous event-driven JavaScript runtime.
What exactly it means?
First let's split the words :
Asynchronous:
Asynchronous means there is no particular sequence of executing the tasks. Whenever the I/O is free, it will execute the task accordingly. For better understanding checkout the below image:
Event-Driven:
That means whenever any action is called. For example, when button is clicked perform this. That is called event-driven.
So overall, you get the idea about NodeJs. Our next discussion will be about Why should we use NodeJs?
Top comments (0)