Skip to content
Related Articles

Related Articles

ES6 | Environment Setup

Improve Article
Save Article
  • Last Updated : 05 Aug, 2021
Improve Article
Save Article

ES6 can run on local machines, only it needs a browser and a text editor. Otherwise, ES6 can run on any host, on any OS. For ES6, it may not be an all-time execute on the browsers. So we need some extra mechanism to executes the ES6 version. 

  • NodeJS
  • Code Editor
  • Browser

NodeJS: For web server, NodeJS is an open-source, cross-platform, JavaScript run-time environment that executes JavaScript code outside of a browser. To install the NodeJS in your machine follow the below links. 

Code Editor: To write the executable code we will require a text editor. In my opinion, VS code editor is the first choice you can choose. To install VS Code follow the below links.

Browser: To run the ES6 program. I prefer to use Google Chrome, there are so many other browsers like Firefox, Internet Explorer, Safari.
Execute the ES6 code: 

  • Step 1: Now make a folder anywhere of your PC and run command prompt in that folder and make a HTML file by using VS Code editor paste the below code inside the file and save it. 


<html lang="en">
        <meta charset="UTF-8"/>
        <meta name="viewport"
        <meta http-equiv= "X-UA-Compatible"
        <title>hello world!</title>
        <b>A Computer Science Portal for Geeks</b>

  • Step 2: Then write the below command in the command prompt, and hit enter. 
npm install http-server -g
  • npm is a package manager for the JavaScript programming, by default it is provided by the NodeJS. Full form of npm is Node Package manager. It has many libraries and we can easily use them by Node. here we are use a library http-server to establish server. 

  • Step 3: Then, after the installation below command will turn on the server. 
http-server -p 1234
//1234 is a random port number

  • Step 4: After that, open your browser and write below URL in the search box. Then, the HTML page you make earlier after making the folder will show on the web. 


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!