Categories: Javascript Tutorial

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
Admin

Working Professional with more than 12 Years of Experience in Software Testing with Automation and Manual Testing Knowledge.

Recent Posts

Objects, Classes and Constructor in Javascript

Objects, Classes and Constructor in Javascript Classes and Objects A class in any programming language…

55 years ago

OOPs in Javascript

We will start from object oriented programming basics like What are different concepts in Object…

55 years ago

Why we can not over ride Constructor

Why we can not over ride a Constructor This is a very important question, that,…

55 years ago

Javascript Tutorial – Arrow Function in Javascript

What is Arrow Function In the last session, We had discussed about Anonymous Function. Anonymous…

55 years ago

Javascript Tutorial – Anonymous Function in Javascript

What is Anonymous Function Anonymous Function is a type of function which has no name…

55 years ago

Javascript Tutorial – Map, Filter and Reduce

What is Map, Reduce and Filter Map Filter and Reduce are higher order methods for…

55 years ago