views

Download and install Node.js at https://nodejs.org/en/. Node.js is a server-side environment that you need to use code. Node.js works for both Windows and macOS. Skip this step if you already have Node.js installed on your computer. Click LTS, the first green button to the left. This will install a stable version of Node.js to your computer. If you're using a Windows computer, you'll most likely need to run the downloaded file and continue through the installation wizard. If you're using macOS, you'll most likely need to run the installed file, then drag and drop the application icon to your Applications folder.

Download and install Visual Studio Code at https://code.visualstudio.com/. VSC is a program that runs on both Windows and Mac that allows you to create ES6 code. Click Download in the top right corner of the page if the current Download for (your OS) is incorrect. Windows users might need to run the downloaded file and continue through the installation wizard. If you're using macOS, you'll most likely need to run the installed file, then drag and drop the application icon to your Applications folder.

Create an empty folder on your drive or desktop. To do this, just open File Explorer or Finder, go to the location (for example, C drive) where you want to create your folder. Name it something simple that you will remember (like "JS" or "Nodefolder").

Open Visual Studio Code. You'll find this in your Start Menu or Applications folder in Finder.

Open the empty folder in VSC. Go to File > Open New Folder to open the file browser and select your empty folder. You'll see your folder's name in the panel on the left side of the application.

Create a file in your folder. Click the page and plus sign (+) icon next to the folder name. Name it something simple, for example "helloworld.js".

Enter the following code in the text pane on the right. console.log('Hello world');

Test that the code works. Since you have Node.js installed, you'll see a "Terminal" window near the bottom of your program. Type node helloworld.js and you should get a response of "Hello world" in the next line. You should be able to create any ES6 code you want here. For code examples, you can look https://www.freecodecamp.org/news/getting-started-with-es6-using-a-few-of-my-favorite-things-ac89c27812e0/ and https://code.visualstudio.com/docs/languages/javascript.
Comments
0 comment