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.
- VS Code – It is a local IDE, which we need to install to our local desktop or laptop.
- 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
- Launch VS Code
- Open Folder in VS Code where we set up our project.
- 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
- Go to any Browser
- Go to https://replit.com/
- Login or Sign up to Replit
- Click on create Repl
- Search for node js template
- Write some name for your project in Title Section
- Click on Create Repl. Project will be created.
- 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
- Writing first program in Javascript
- How to use a local IDE
- How to use an online IDE