node.js--Study Notes

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.