top of page

Intro to basic JavaScript

In these lessons you will get to know what JavaScript can do and get an overview of Javascript.

JavaScript is an easy programming language to learn. In a web page, it is JavaScript that makes the page interactive. JavaScript was created by Brendan Eich in 1995.

With JavaScript you can create functionality for web pages so they can do more than just display static content. When you get more experience, it is possible to create 2D and 3D content, games and animations. It is also possible to use JavaScript elsewhere than in the browser. One can also build backend solutions and desktop applications.

For this introduction to basic JavaScript, we will stay in the browser and focus on what can be done there.

Hello World

The best way to learn is to try. So now we'll start with our very first piece of code. As you always do when you create your first code in a new programming language, we start with "Hello World". A very simple snippet of code to get you started.

Let's start with HTML. This one is simple. We use a heading, an h1. Let's insert three dots for now.

Next thing to do now is to add the JavaScript part of our code.

Congratulations! You have now created your first JavaScript code. This is the full example:

©2022 - 2024 by JavaScript Schools.

bottom of page