JS

JavaScript Fundamentals

25 lessons

Progress0%
1. Introduction to JavaScript
1What is JavaScript?2Setting Up Your Environment
2. Variables and Data Types
1Declaring Variables2Data Types3Type Conversion
3. Operators
Arithmetic OperatorsComparison OperatorsLogical Operators
4. Control Flow
Conditional StatementsLoops
5. Functions
Function Basics
6. Arrays & Iteration
Array MethodsSpread, Rest & Destructuring
7. Objects & JSON
Working with ObjectsJSON & Optional Chaining
8. OOP & Classes
Class BasicsInheritance & Private Fields
9. Modules & Modern JS
ES ModulesModern JavaScript Features
10. Async JavaScript
PromisesAsync/Await
11. Error Handling
Error Types & try/catchCustom Errors & Debugging
12. Iterators & Advanced
Iterators & GeneratorsMap, Set & WeakRefs
All Tutorials
JavaScriptIntroduction to JavaScript
Lesson 1 of 25 min
Chapter 1 · Lesson 1

What is JavaScript?

JavaScript is a versatile, high-level programming language that powers the interactive elements of websites. Originally created in 1995 by Brendan Eich at Netscape, it has evolved into one of the most popular programming languages in the world.

JavaScript enables you to create dynamic content, control multimedia, animate images, and build complete web applications. It runs in every web browser without requiring any installation, making it incredibly accessible.

Today, JavaScript is used not only for frontend web development but also for backend servers (Node.js), mobile apps (React Native), desktop applications (Electron), and even machine learning (TensorFlow.js).

Code Examples

Hello Worldjavascript
// Your first JavaScript program
console.log("Hello, World!");

// Variables store data
let name = "Developer";
console.log("Hello, " + name + "!");

// Template literals make string formatting easier
console.log(`Welcome to JavaScript, ${name}!`);

The console.log() function outputs text to the browser's developer console. It's the most common way to debug and test your code.

Browser Interactionjavascript
// JavaScript can interact with the web page
document.body.innerHTML = "<h1>Hello from JavaScript!</h1>";

// Show an alert dialog
alert("Welcome to the tutorial!");

// Get user input
let userName = prompt("What's your name?");
console.log("User entered: " + userName);

JavaScript has built-in methods to interact with the browser and web page. These are called Web APIs.

Quick Quiz

1. What year was JavaScript created?

2. What function is used to output text to the console?

Was this lesson helpful?

OverviewNext