Learn JavaScript ๐Ÿš€

Learn JavaScript from beginner to advanced with simple explanations, real examples, coding exercises and a live JavaScript editor.

๐Ÿ“Š Your Learning Progress

25% completed

๐Ÿ“˜ JavaScript Basics

JavaScript is a programming language used to make websites interactive and dynamic.

console.log("Hello, JavaScript!");

๐Ÿ”ค Variables & Data Types

Variables are used to store information in JavaScript. Use let for changeable values and const for values that should not be reassigned.

let name = "John";

const age = 25;

let isStudent = true;

console.log(name);
console.log(age);
console.log(isStudent);

๐Ÿ”€ If / Else & Loops

Conditions allow your program to make decisions. Loops repeat code multiple times.

let marks = 75;

if (marks >= 50) {

    console.log("Pass");

} else {

    console.log("Fail");

}

for (let i = 1; i <= 5; i++) {

    console.log(i);

}

โš™๏ธ Functions

A function is a reusable block of code.

function greet(name) {

    return "Hello " + name;

}

console.log(greet("John"));

๐Ÿ“ฆ Arrays & Objects

Arrays store multiple values. Objects store data using key-value pairs.

const fruits = [
    "Apple",
    "Mango",
    "Banana"
];

console.log(fruits[0]);


const user = {

    name: "John",
    age: 25

};

console.log(user.name);

๐ŸŒ DOM Manipulation

The DOM allows JavaScript to interact with HTML elements and change webpage content.

document.querySelector("#title")
.textContent = "JavaScript is Awesome!";

โšก Events

Events happen when users interact with a webpage, such as clicking a button or typing into an input.

document.querySelector("#myButton")
.addEventListener("click", function() {

    alert("Button clicked!");

});

๐Ÿงช Live JavaScript Editor

Write JavaScript code below and click Run Code to see the output.


Output will appear here...

๐Ÿ“ JavaScript Exercises

Exercise 1: Create two numbers and print their sum.
Exercise 2: Check whether a number is even or odd.
Exercise 3: Print numbers from 1 to 10 using a loop.
Exercise 4: Create a function that returns the square of a number.

๐ŸŽฏ Course Levels

๐ŸŒฑ Beginner

Basics, Variables, Operators and Conditions.

๐Ÿš€ Intermediate

Functions, Arrays, Objects and DOM.

๐Ÿ”ฅ Practice

Events, Projects, Exercises and Live Coding.