Javascript Tutorial – Writing First Program

Writing First Program

In our last session, We had discussed about Installation required in order to work with Javascript. In this session, We are going to write our first Javascript Program. So, We need an IDE to write Javascript Program, and we are going to use 2 types of IDEs for writing Javascript Programs.

  1. VS Code – It is a local IDE, which we need to install to our local desktop or laptop.
  2. Replit – It is an online IDE, and we don’t need to install it to our local desktop or laptop.

Writing first Program in VS Code

So, Let’s launch VS Code and write our first program there.

Steps

  1. Launch VS Code
  2. Open Folder in VS Code where we set up our project.
  3. Create a js file and write program.
Console.log("Hello World")
Console.log("QA Peddia")
Console.log("Hello Javascript")

Writing first Program in Replit

Now, Let’s launch Online IDE Replit and write our first program there.

Steps

  1. Go to any Browser
  2. Go to https://replit.com/
  3. Login or Sign up to Replit
  4. Click on create Repl
  5. Search for node js template
  6. Write some name for your project in Title Section
  7. Click on Create Repl. Project will be created.
  8. Create a new js file in the Project and write code there.
Console.log("Hello World")
Console.log("QA Peddia")
Console.log("Hello Javascript")

Summary

We have discussed about

  1. Writing first program in Javascript
  2. How to use a local IDE
  3. How to use an online IDE

Leave a Comment