Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

JavaScript VScode

JavaScript VScode

In the previous chapter we introduced basic JavaScript concepts and examples; in this chapter we will introduce the editor for JS code -- VScode.

VSCode (full name: Visual Studio Code) is a free cross-platform source code editor developed by Microsoft; the VSCode development environment is very simple and easy to use.

Visual Studio Code has built-in support for JavaScript features, including JavaScript IntelliSense, debugging, formatting, and more.

The IntelliSense feature is shown below:

Install VS Code

Installing VSCode is also simple: open the official site https://code.visualstudio.com/, download the package and install it step by step. During installation, pay attention to the installation path setting and that environment variables are added to the system automatically; check all the following options:

For the full VSCode installation tutorial, see:https://www.runoob.com/vscode/vscode-tutorial.html


Create a JS code file

Open VScode and click New File:

Click to select the language:

Type js in the search box and create the test.js file:

Enter the code:

console.log("Hello, World!");

Save the test.js file code, right-click the file name, and run the following command in the integrated terminal:

# node test.js

Hello, World!        # 输出结果

node is a runtime environment for JavaScript that can run JavaScript commands, based on the Chrome V8 engine.

For more on Node.js, see:Node.js Tutorial

More Related Tools