Writing Your First Program in JavaScript

Here will not go to the basis of javascript but you should keep in mind that it is the language of creating powerful websites and is called the language of web for the web. We will go through how to write your first Program/code in javascript.

Your First Program:

To write your first program in javascript you will be needing an Integrated Development Environment or IDE such as visual studio, jet brains etc. As javascript is known for how it is approachable we can use only our browser for it.

How to Use Browser for Writing JavaScript:

Well, here is the method your writing javascript in the browser.

  1. Go to any browser chrome, edge, brave etc.

  2. Right-click on the first web page that appears.

  3. Go to the inspect option from the menu that appears. It is probably at the last of the list.

  4. There appears A developer tool on the right side of the browser. Click on the console option from that.

  5. In the console, you will see the sign like > where you write your code to be executed.

Now here's the Code:

console.log("Hello World!")

You can simply copy this code snippet from here or can write it in the console and press Enter which will execute your first code. And you will see Hello World! appear on the console.