DEV Community

Cover image for Simple Hello World Program in Javascript
Jima Victor
Jima Victor

Posted on • Updated on

Simple Hello World Program in Javascript

Hello world!!

This would be a very basic tutorial on how to write your very first javascript program.

This tutorial is geared towards beginners and anyone who ones to start learning Javascript.

Now, to keep things really simple, we're not going to be installing any code editor or IDEs.

All you need for this to work is your good old web browser.

Let's begin..

Step 1:

Open your preferred browser.

Step 2:

Press either CTRL + SHIFT + I or F12 to open the Developer Tools.

Step 3:

Click on the console tab to enter into the developer console.

Step 4:

Write the following code in the developer's console.

console.log("Hello World");
Enter fullscreen mode Exit fullscreen mode

Then press Enter.

Congratulations! You have written your very first javascript program.

Now, to have a little fun, you can try out other variations of this code like:

console.log(6 + 4);
Enter fullscreen mode Exit fullscreen mode

or

console.log("Programming is hard but really fun");
Enter fullscreen mode Exit fullscreen mode

or

alert("hello world");
Enter fullscreen mode Exit fullscreen mode

or

alert(6 + 6);
Enter fullscreen mode Exit fullscreen mode

You get the idea. Happy coding!!

Top comments (0)