Labs ICT
โญ Pro Login

Introduction

What is JavaScript?

JavaScript (often shortened to JS) is a high-level, dynamic programming language that makes web pages interactive. Created by Brendan Eich in 1995, it started as a simple scripting language for Netscape Navigator and has since grown into one of the most powerful and widely-used languages in the world.

It's a client-side language โ€” meaning it runs in the user's browser โ€” but thanks to Node.js it also powers servers, databases, and even desktop applications.

The beauty of JavaScript is its immediacy. Write code, refresh the page, see results. No compilers, no build steps, no friction.

Your First JavaScript

Let's see three quick examples that show what JavaScript can do.

1. Hello, World!

console.log("Hello, World!");
Try it Yourself โ†’

2. Working with Variables

let message = "JavaScript is dynamic!";
console.log(message);
message = 42;
console.log(message);
Try it Yourself โ†’

Same variable, different types. That's dynamic typing in action.

3. A Simple Function

function greet(name) {
  return "Hello, " + name + "!";
}
console.log(greet("Alice"));
console.log(greet("Bob"));
Try it Yourself โ†’

๐Ÿงช Quick Quiz

Where can JavaScript run?