Simple Hello World Program in Javascript

jimajs

Jima Victor

Posted on October 18, 2021

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!!

💖 💪 🙅 🚩
jimajs
Jima Victor

Posted on October 18, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

How JavaScript works
javascript How JavaScript works

November 8, 2024

A Beginner's Guide to JavaScript Closures
javascript A Beginner's Guide to JavaScript Closures

November 5, 2024

Type Coercion in JavaScript Explained
javascript Type Coercion in JavaScript Explained

November 18, 2024

Introduction to Asynchronous JavaScript
javascript Introduction to Asynchronous JavaScript

October 14, 2024

Strings -- Manipulating the Immutable.
javascript Strings -- Manipulating the Immutable.

November 15, 2024