Javascript Tutorial – Installation

Javascript Tutorial – Installation

We had seen introduction to Javascript in our last session, and we are going to see, installation required in order to work with Javascript programming. This is a 4 step process.

  1. Selecting an IDE – Download and Install
  2. Download and Install Node js
  3. Install npm
  4. Setting up the project

Selecting an IDE – Download and Install

We can either use an online IDE or we can download an IDE and install it. Visual Studio Code is one such IDE which can be downloaded and installed. replit is one AI based Online IDE which we can use online.

Steps to download and install VS Code

  1. Navigate to https://code.visualstudio.com/docs/setup/windows.
  2. Download the Visual Studio Code installer for Windows.
  3. Once, it is downloaded, run the installer (VSCodeUserSetup-{version}.exe).
  4. VS Code will be installed in a minute.

Download and Install Node js

If we use an online IDE, We don’t need to download and install Node js, but if we are using VS Code, then we need to download and install Node js.

Steps to download and install Node js

  1. Navigate to node js website.
  2. Click on the download header.
  3. Click on the Windows Installer.
  4. Once it is downloaded, just click on the downloaded file and install it.
  5. Once, Node js is installed, you need to check if it is installed.
  6. You need to go to command prompt, and type node -v or node –version in the command prompt. If it results a version, then node js is installed, but if you get an error, then the node js is not installed and you need to install it.

Install npm

We don’t need to install npm seperately, when we install node js, then npm gets installed automatically. We can just check the version of npm in command prompt by using npm -version, npm -v, npm –version commands.

Setting up Project

Whenever we have to create a Javascript project in our desktop, then we will have to follow some steps for that.

  1. Go to Command Prompt.
  2. Change Directory. Type a command cd DirName
  3. Create a new Folder or Directory. mkdir JavascriptDemo
  4. Change Directory. Type a command cd C:\JavascriptDemo. This is a place where we will create our Javascript Project.
  5. Type npm init in command prompt. This command is going to create package.json file for us.
  6. At the end, just click to enter to confirm. Our Package.json file is created now.

Now, Our Project is setup and we can start writing our Javascript programs.

Summary

We have covered below topics in this session.

  1. Selecting an IDE – Download and Install
  2. Download and Install Node js
  3. Install npm
  4. Setting up the project

Leave a Comment