Overview
JavaScript is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2024, 98.7% of websites use JavaScript on the client side for webpage behavior. All major web browsers have a dedicated JavaScript engine to execute the code on users' devices. With Node.js, JavaScript has also become a dominant force in server-side development.
Key Features
- Ubiquitous — Runs in every browser, on servers (Node.js), mobile (React Native), and desktop (Electron)
- Event-driven & asynchronous — Non-blocking I/O with promises and async/await
- First-class functions — Functions are objects; enables powerful functional programming patterns
- Prototype-based inheritance — Flexible object model without traditional classes (though class syntax exists)
- Massive ecosystem — npm hosts over 2 million packages
Common Use Cases
- Frontend Development — React, Vue, Angular, Svelte
- Backend Development — Node.js, Express, Fastify, Hono
- Mobile Apps — React Native, Ionic
- Desktop Apps — Electron, Tauri (with JS frontend)
- Tooling & Build Systems — Webpack, Vite, esbuild
Code Example
javascript
Learning Resources
Learning Path
27 topics across 6 sections
1Basics
JavaScript fundamentals for the browser and beyond.
- Introduction to JavaScript — History, ECMAScript standards, and where JS runs
- Variables & Data Types — let, const, var, primitives, typeof, and type coercion
- Operators — Arithmetic, comparison (== vs ===), logical, nullish coalescing (??)
- Control Flow — if/else, switch, for, while, for...of, for...in
- Functions — Declaration, expression, arrow functions, default params, rest/spread
2Objects & Arrays
Working with JavaScript's core data structures.
- Objects — Literals, property access, destructuring, computed keys, Object methods
- Arrays — Methods (map, filter, reduce, find, some, every), spread, destructuring
- JSON — Parsing, stringifying, and working with API responses
- Maps & Sets — Map vs object, Set vs array, WeakMap, WeakRef
3Async Programming
Handling asynchronous operations in JavaScript.
- Callbacks — Callback pattern, callback hell, and error-first convention
- Promises — then/catch/finally, Promise.all, Promise.race, Promise.allSettled
- Async/Await — Syntactic sugar for promises, error handling, and parallel execution
- Event Loop — Call stack, task queue, microtasks, and how JS is single-threaded
- Fetch API — HTTP requests, headers, responses, AbortController
4DOM & Browser APIs
Interacting with web pages and browser features.
- DOM Manipulation — querySelector, createElement, event listeners, and delegation
- Events — Event bubbling, capturing, preventDefault, and custom events
- Web Storage — localStorage, sessionStorage, cookies, and IndexedDB
- Canvas & Web APIs — Canvas 2D, Geolocation, Intersection Observer, Web Workers
5OOP & Patterns
Object-oriented programming and design patterns in JS.
- Prototypes — Prototype chain, __proto__, Object.create, and inheritance
- Classes — class syntax, constructor, extends, super, private fields (#)
- Modules — ES modules (import/export), dynamic import(), and CommonJS
- Design Patterns — Module, Observer, Factory, Singleton, and Proxy patterns
6Modern JavaScript
ES6+ features and advanced techniques.
- Destructuring & Spread — Object/array destructuring, rest params, and spread syntax
- Iterators & Generators — Symbol.iterator, function*, yield, and async generators
- Proxy & Reflect — Metaprogramming with Proxy traps and Reflect API
- Error Handling — try/catch, custom errors, Error types, and global error handlers
- Performance — Memory leaks, debouncing, throttling, and requestAnimationFrame