Simply put, node. JS is the JavaScript that runs on the server.
node. JS is a platform built on the Chrome JavaScript runtime.
node. JS is an event-driven I/O server-side JavaScript environment, based on the Google V8 engine, the V8 engine executes JavaScript very quickly and with great performance.
Version to use
We can use the following command to view the current Node version:
$ node-vv4.4.3
Note: There may be differences between different versions.
First node. JS Program: Hello world! Script mode
Here's our first node. JS Program:
Instance
Console.log ("Hello World");
Run an instance?
Save the file with the file name Helloworld.js and execute it via the node command:
Node HelloWorld. JS
After the program executes, normal, the output of Hello world will be in the terminal.
Interactive mode
Open terminal, type node into the command interaction mode, you can enter a code statement immediately after execution and display the results, for example:
$ node> console. Log(' Hello world! ' ); HelloWorld!
node.js--Study Notes