Learn JavaScript
A structured guide to JavaScript, from the language fundamentals to asynchronous code, the browser, Node.js, TypeScript, and the tools around them.
Welcome
Start with what JavaScript is, where it runs, and how to write a first program.
-
JavaScript Welcome Guide: What JavaScript Is and Why It Matters
Learn what JavaScript is, why it matters, where it runs, what it can do, and the best next steps for starting your JavaScript journey.
-
Why JavaScript? Reasons to Learn JavaScript in 2026
Learn why JavaScript is worth learning today, what makes it unique, where it runs, and why it remains the dominant language of the web.
-
Where JavaScript Runs: Browser vs Node.js Explained
Learn where JavaScript runs in browsers and Node.js, what each environment provides, and how to choose the right runtime for your code.
-
JavaScript Editor, Linter, and Formatter Setup Guide
Set up JavaScript editors, linters, and formatters for a smoother workflow, cleaner code, and faster feedback in everyday projects.
-
ECMAScript Versions & Compatibility in JavaScript
Learn how ECMAScript versions affect JavaScript features, browser support, and compatibility so you can choose syntax that runs safely.
-
JavaScript Your First Program: console.log Basics for Beginners
Learn how to write your first JavaScript program with console.log, run it in the browser or Node.js, and avoid common beginner mistakes.
JavaScript Basics
Learn the values, variables, and type checks you use in everyday JavaScript.
-
JavaScript Values and Types: Number, String, Boolean, null, undefined
Learn JavaScript values and types, including Number, String, Boolean, null, and undefined, with syntax, examples, common mistakes, and best.
-
JavaScript Variables: var, let, and const Explained
Learn how JavaScript var, let, and const work, when to use each one, scope differences, hoisting, reassignment, and common mistakes.
-
JavaScript typeof vs instanceof: How to Check Types Correctly
Learn how JavaScript typeof and instanceof work, when to use each one, common mistakes, and how to avoid unreliable type checks.
-
JavaScript Type Coercion: Implicit vs Explicit Conversion
Learn JavaScript type coercion, including implicit and explicit conversion, with practical examples, common mistakes, and best practices.
-
JavaScript Numbers, BigInt & Math: A Complete Beginner Guide
Learn JavaScript numbers, BigInt, and Math: numeric syntax, safe integer limits, rounding, calculations, common mistakes, and practical.
-
JavaScript Date: Working with Dates and Times in JS
Learn JavaScript Date basics, parsing, formatting, timestamps, time zones, and common mistakes so you can handle dates and times correctly.
-
JavaScript Symbol: Unique Primitive Values, Uses, and Examples
Learn JavaScript Symbol values, how they create unique keys, when to use them, and how Symbol.for, Symbol.iterator, and common mistakes.
Strings & Regular Expressions
Work with text, from ordinary strings and template literals to regular expressions.
-
JavaScript Strings and Encodings: Characters, Bytes, and Unicode
Learn how JavaScript strings work with Unicode, UTF-16, and encodings, plus common pitfalls, conversions, and safe handling tips.
-
JavaScript String Methods: slice, includes, replace, and More
Learn JavaScript string methods like slice(), includes(), replace(), and trim() with examples, common mistakes, and practical use cases.
-
JavaScript Template Literals & Tagged Templates
Learn JavaScript template literals and tagged templates: syntax, interpolation, multiline strings, escaping, practical examples, and common.
-
JavaScript Regex Basics: Literals, Flags, and Core Syntax
Learn JavaScript regex basics, including literal syntax, common flags, test and match examples, and mistakes to avoid when building.
-
JavaScript Regex Methods: test(), exec(), match(), and replace()
Learn how JavaScript regex methods test(), exec(), match(), and replace() work, when to use each one, and common mistakes to avoid.
-
JavaScript Regex Patterns: Groups, Lookarounds, and Quantifiers
Learn JavaScript regex patterns with groups, lookarounds, and quantifiers. Build, read, and debug practical patterns in ES2020+ code.
Operators
See how JavaScript calculates, compares, and combines values, including the operators that handle missing data.
-
JavaScript Arithmetic Operators: Addition, Subtraction, Multiplication
Learn JavaScript arithmetic operators, how +, -, *, /, %, **, ++, and -- work, common pitfalls, and practical examples.
-
JavaScript Comparison Operators: ==, ===, !=, !== and More
Learn JavaScript comparison operators, including ==, ===, !=, !==, <, >, <=, and >=, with examples, pitfalls, and best practices.
-
JavaScript Logical Operators: &&, ||, and ! Explained
Learn JavaScript logical operators &&, ||, and !, how they work, short-circuiting, truthy values, and common mistakes with examples.
-
JavaScript Ternary Operator: Syntax, Examples, and Common Mistakes
Learn the JavaScript ternary operator, its syntax, practical examples, common mistakes, and when to use it instead of if...else.
-
JavaScript Nullish Coalescing (??): Fallback Values for null and undefined
Learn JavaScript nullish coalescing (??), how it differs from ||, when to use it, and common mistakes with safe fallback examples.
-
JavaScript Optional Chaining (?.): Safely Read Nested Values
Learn JavaScript optional chaining (?.), how it prevents null errors, how to read nested properties, call methods, and use it safely.
-
JavaScript Bitwise & Shift Operators: &, |, ^, ~, <<, >>, >>>
Learn JavaScript bitwise and shift operators, how they work with 32-bit integers, practical examples, common mistakes, and real-world uses.
-
JavaScript Operator Precedence: How Expressions Are Evaluated
Learn JavaScript operator precedence, associativity, and grouping so you can predict how expressions are evaluated and avoid subtle bugs.
Control Flow
Choose paths through a program with conditions, switches, and error handling.
-
JavaScript if / else: Conditional Statements Explained
Learn how JavaScript if/else statements work, when to use each branch, common mistakes, and practical examples for real-world control flow.
-
JavaScript switch Statement: Syntax, Cases, and Break
Learn how the JavaScript switch statement works, when to use it, how case and break behave, and common mistakes to avoid.
-
JavaScript try / catch / finally: Handling Errors Safely
Learn JavaScript try/catch/finally for safe error handling, cleanup, and reliable control flow with examples, mistakes, and best practices.
-
JavaScript throw Errors: Throwing Exceptions and Custom Errors
Learn how JavaScript throw works, when to use it, how to throw custom errors, and how to handle exceptions with try...catch.
Loops & Iteration
Repeat work with loops, iterators, and generators.
-
JavaScript for, while, and do...while Loops Explained
Learn JavaScript for, while, and do...while loops with syntax, examples, common mistakes, and when to use each loop type.
-
JavaScript for...of vs for...in: Differences and Use Cases
Learn the difference between JavaScript for...of and for...in, when to use each, common mistakes, and practical examples.
-
JavaScript Iterators: How They Work and How to Use Them
Learn JavaScript iterators, how the iterator protocol works, how to create custom iterators, and how they differ from iterable objects.
-
JavaScript Generators (function*) Explained with Examples
Learn JavaScript generators, how function* and yield work, when to use iterators, and common mistakes with practical examples.
Data Structures
Store and reshape data with arrays, objects, maps, sets, and JSON.
-
JavaScript Arrays: Basics, Methods, and Practical Examples
Learn JavaScript arrays, how they store ordered data, common methods, mistakes, and practical examples for everyday coding.
-
JavaScript Array Methods: map, filter, reduce, and More
Learn JavaScript array methods like map, filter, and reduce with clear examples, common mistakes, best practices, and practical use cases.
-
JavaScript Objects: Properties, Methods, and Object Literals
Learn JavaScript objects, how to create and read properties, use methods, copy objects, and avoid common object mistakes.
-
JavaScript Map, Set, WeakMap, and WeakSet: Complete Guide
Learn JavaScript Map, Set, WeakMap, and WeakSet with syntax, examples, differences, common mistakes, and best practices.
-
JavaScript Typed Arrays: Binary Data, Buffers, and Views
Learn JavaScript Typed Arrays, ArrayBuffer, and DataView. See how binary data works, when to use each view, and common mistakes to avoid.
-
JavaScript JSON: Parse, Stringify, and Work with Data
Learn JavaScript JSON parsing, stringifying, syntax, common errors, and best practices for storing, sending, and reading structured data.
Functions
Define functions, bind this, and pass behavior around with closures and higher-order functions.
-
JavaScript Defining Functions: Syntax, Examples, and Best Practices
Learn how to define functions in JavaScript with declarations, expressions, arrow functions, parameters, and common mistakes to avoid.
-
JavaScript Parameters, Defaults & Return Values
Learn JavaScript function parameters, default values, and return values with clear examples, common mistakes, and practical usage.
-
JavaScript Arrow Functions (=>): Syntax, Behavior, and Examples
Learn JavaScript arrow functions, their syntax, how they handle this, and when to use them with clear examples and common mistakes.
-
JavaScript this Binding Explained: How Context Works
Learn JavaScript this binding, how call site affects it, and how to use call, apply, bind, arrow functions, and methods correctly.
-
JavaScript Closures: How They Work and Why They Matter
Learn JavaScript closures, how they capture variables, common mistakes, practical examples, and when to use them in real code.
-
JavaScript Rest & Spread (...) Explained with Examples
Learn JavaScript rest and spread syntax (...) with clear examples, differences, common mistakes, and practical uses in functions and arrays.
-
JavaScript Higher-Order Functions: Functions That Use Functions
Learn what higher-order functions are in JavaScript, how they work, common examples like map and filter, and practical patterns and.
-
JavaScript Currying and Composition: Functions That Chain Cleanly
Learn JavaScript currying and function composition with clear examples, common mistakes, practical uses, and tips for building reusable.
Objects & Prototypes
Understand how JavaScript objects share behavior through prototypes, and how to inspect them.
-
JavaScript Prototype Chain Explained: How Inheritance Works
Learn how the JavaScript prototype chain works, how property lookup resolves, and how to use prototypes safely in modern code.
-
JavaScript Object Literals and Enhancements
Learn JavaScript object literals, shorthand properties, computed property names, method syntax, and common mistakes with practical ES2020.
-
JavaScript Property Descriptors: Getter and Setter Basics
Learn JavaScript property descriptors with get and set accessors, how they work with Object.defineProperty, and common mistakes to avoid.
-
JavaScript Reflection: Object.* and Reflect Methods Explained
Learn JavaScript reflection with Object.* and Reflect: inspect, read, write, delete, and enumerate object properties safely and predictably.
-
JavaScript Proxy and Revocable Proxy Explained
Learn how JavaScript Proxy and revocable Proxy objects intercept operations, validate data, customize behavior, and safely disable proxies.
Classes & Modules
Organize code with classes, inheritance, and modules.
-
JavaScript Classes: Constructor, Fields, and #Private
Learn JavaScript classes, constructor methods, public fields, and #private fields with clear examples, common mistakes, and best practices.
-
JavaScript Inheritance and super: Extend Classes and Call Parents
Learn JavaScript inheritance and super in ES2020+: how classes extend other classes, call parent constructors, and override methods safely.
-
JavaScript Static Fields and Methods: Class-Level Members
Learn JavaScript static fields and methods, how they differ from instance members, how to use them, and common mistakes to avoid.
-
JavaScript ES Modules (import and export) Guide
Learn JavaScript ES modules, including import and export syntax, default and named exports, module files, and common module loading.
-
JavaScript Module Patterns: Encapsulation, Privacy, and Reuse
Learn JavaScript module patterns for encapsulation, private state, reusable APIs, and organizing code with practical ES2020 examples.
Asynchronous JavaScript
Handle work that finishes later, from callbacks and promises to async/await and the event loop.
-
JavaScript Callbacks: How They Work in Asynchronous Code
Learn JavaScript callbacks, how they work in asynchronous code, common mistakes, and practical examples for beginners and intermediate.
-
JavaScript Promises: A Complete Guide to Async Workflows
Learn JavaScript promises, how they work, how to chain them, handle errors, and use Promise.all, race, allSettled, and finally.
-
JavaScript async / await: Promises, Syntax, and Common Pitfalls
Learn JavaScript async/await syntax, how it works with Promises, practical examples, error handling, and common mistakes to avoid.
-
JavaScript Promise Patterns: all, race, any, and allSettled
Learn JavaScript Promise patterns with all, race, any, and allSettled. Compare their behavior, use cases, pitfalls, and practical examples.
-
JavaScript Event Loop, Task Queue, and Microtask Queue
Learn how the JavaScript event loop schedules tasks and microtasks, why promise callbacks run first, and how async code executes in.
-
JavaScript Web Workers: Run CPU-Heavy Code in the Background
Learn what Web Workers are, how to create them, send messages, handle errors, and avoid common threading pitfalls in browser JavaScript.
-
JavaScript Streams: Readable, Writable, and Transform Streams
Learn JavaScript streams, including readable, writable, and transform streams, how they work, common methods, backpressure, and real use.
-
JavaScript Observables: Concepts, Behavior, and Practical Uses
Learn JavaScript Observables, how they model streams of values, how subscriptions work, and how they differ from Promises in practice.
Advanced Concurrency
Look at workers, shared memory, and the other tools JavaScript uses for concurrent work.
-
JavaScript SharedArrayBuffer: Shared Memory for Worker Concurrency
Learn JavaScript SharedArrayBuffer, how shared memory works with workers, how to create views, sync with Atomics, and avoid cross-origin.
-
JavaScript Atomics API: Shared Memory, Atomic Operations, and Concurrency
Learn the JavaScript Atomics API for safe shared memory access in workers, including atomic reads, writes, waits, notifications, and common.
-
JavaScript Lock-free Patterns: Concurrency Without Blocking
Learn JavaScript lock-free patterns for safe shared-state coordination, compare them with locking, and avoid race conditions in concurrent.
DOM & Browser APIs
Use JavaScript in the browser to work with the page, network, storage, and other web APIs.
-
JavaScript DOM Basics: querySelector and createElement
Learn JavaScript DOM basics with querySelector and createElement, including how to find elements, build nodes, and avoid common mistakes.
-
JavaScript Events and Event Delegation: Complete Guide
Learn how JavaScript events work, how to handle bubbling and capturing, and how event delegation simplifies dynamic UI code.
-
JavaScript Fetch API and AJAX: Make HTTP Requests in the Browser
Learn JavaScript Fetch API and AJAX to send requests, read responses, handle errors, and replace older XMLHttpRequest code in the browser.
-
JavaScript URL, FormData & Search Params: A Practical Guide
Learn how URL, FormData, and URLSearchParams work in JavaScript to build, read, and send query strings and form data in the browser.
-
JavaScript Storage: localStorage, sessionStorage, and Cookies
Learn how JavaScript localStorage, sessionStorage, and cookies work, when to use each, and how to store data safely in the browser.
-
JavaScript History & Navigation: Window History API Guide
Learn the JavaScript History API and browser navigation methods: back, forward, go, pushState, replaceState, popstate, and common pitfalls.
-
JavaScript Canvas: Drawing Shapes, Images, and Animation
Learn how JavaScript Canvas works, how to draw shapes and images, animate graphics, and avoid common canvas setup and rendering mistakes.
-
JavaScript Web Components: Custom Elements, Shadow DOM, and Slots
Learn JavaScript Web Components, including custom elements, Shadow DOM, and slots.
-
JavaScript Performance API: Measure Page and App Performance
Learn the JavaScript Performance API to measure navigation, marks, measures, and resource timing in the browser with practical examples.
-
JavaScript i18n (Intl.*): Formatting Dates, Numbers, and Text
Learn JavaScript Intl APIs for locale-aware date, number, and text formatting with practical examples, common mistakes, and best practices.
Node.js
Run JavaScript outside the browser, including files, HTTP, and Node's own module system.
-
Node.js Overview: What It Is, How It Works, and Why It Matters
Learn what Node.js is, how it runs JavaScript outside the browser, where it fits, and when to use it for servers, tools, and APIs.
-
Node.js Modules: ESM vs CommonJS Explained
Learn the differences between Node.js ESM and CommonJS, how they load modules, syntax differences, interop rules, and when to use each.
-
Node.js fs and path: File System and Path Basics
Learn Node.js fs and path modules for reading files, writing files, joining paths, resolving directories, and avoiding common file errors.
-
Node.js http and https Modules: Servers, Requests, and TLS
Learn how Node.js http and https modules create servers, send requests, and handle TLS, with examples, common mistakes, and practical uses.
-
Node.js process and CLI: Reading Arguments, Exit Codes, and stdio
Learn how Node.js process works with CLI arguments, environment data, exit codes, stdin, stdout, and stderr in real command-line apps.
-
Node.js Streams: A Complete Guide to Streaming Data
Learn Node.js streams, how readable, writable, duplex, and transform streams work, and when to use them for efficient data handling.
-
Node.js Worker Threads and Clusters: Parallelism Guide
Learn how Node.js worker threads and clusters work, when to use each, and how they differ for CPU-bound and multi-core scaling.
Tooling
Set up the packages, bundlers, and formatters that surround a JavaScript project.
-
npm vs Yarn vs pnpm: Package Manager Comparison for JavaScript
Compare npm, Yarn, and pnpm for JavaScript projects, including installs, workspaces, lockfiles, speed, disk use, and when to choose each.
-
JavaScript Bundlers Explained: Vite, Webpack, Rollup, and Parcel
Learn what JavaScript bundlers do, how Vite, Webpack, Rollup, and Parcel differ, and how to choose the right one for your project.
-
JavaScript Transpilers: Babel, SWC, and esbuild Explained
Learn what JavaScript transpilers do, when to use Babel, SWC, or esbuild, and how they fit into modern build workflows.
-
JavaScript Linting & Formatting with ESLint and Prettier
Learn how ESLint and Prettier work together in JavaScript, what each tool does, how to configure them, and common setup mistakes to avoid.
-
JavaScript Testing with Jest, Vitest, and Mocha
Learn JavaScript testing with Jest, Vitest, and Mocha: setup, test structure, assertions, mocks, async tests, and common mistakes.
-
JavaScript E2E Testing with Playwright and Cypress
Learn how JavaScript end-to-end testing works with Playwright and Cypress, when to use each, common mistakes, and best practices.
Testing & Debugging
Check behavior with tests and find problems with the console, browser tools, and the Node debugger.
-
JavaScript Console & Debugging Basics: Log, Warn, and Inspect
Learn JavaScript console basics, including log, warn, error, table, trace, and debugging workflows for finding and fixing bugs faster.
-
JavaScript Browser DevTools: Inspect, Debug, and Profile Web Apps
Learn how JavaScript Browser DevTools help inspect DOM, debug code, monitor network activity, and profile performance in the browser.
-
Node.js Debugger and Inspector: Debug JavaScript with Chrome DevTools
Learn how the Node.js debugger and inspector work, how to start debugging, set breakpoints, inspect state, and fix common issues.
-
JavaScript Performance Profiling: Find and Fix Slow Code
Learn JavaScript performance profiling with browser and Node.js tools, how to read results, spot bottlenecks, and fix slow code.
-
JavaScript Logging & Error Tracking: Console, Errors, and Monitoring
Learn JavaScript logging and error tracking with console methods, try/catch, custom errors, and practical patterns for debugging and.
Security
Recognize the common browser and dependency risks that show up in JavaScript applications.
-
JavaScript XSS and CSRF Basics: Protecting Web Apps
Learn XSS and CSRF basics in JavaScript, how each attack works, how they differ, and the practical defenses every web app needs.
-
JavaScript Content Security Policy (CSP): A Practical Guide
Learn what Content Security Policy is, how it blocks XSS, how to write CSP rules, and common mistakes that break web pages.
-
JavaScript Dependency Security: Auditing and Updating Packages
Learn how to audit JavaScript dependencies, interpret vulnerability reports, update packages safely, and reduce supply-chain risk in.
Performance & Memory
See how JavaScript uses memory and what makes a page or script feel slow.
-
JavaScript Garbage Collection and Memory Leaks Explained
Learn how JavaScript garbage collection works, what causes memory leaks, and how to spot and prevent leaks in real code.
-
JavaScript Performance Optimizations: Faster Code and Lower Memory Use
Learn practical JavaScript performance optimizations, from reducing reflows and allocations to writing faster loops, lookups, and DOM code.
-
JavaScript Core Web Vitals: Concepts, Metrics, and Meaning
Learn what Core Web Vitals measure, why they matter, and how LCP, INP, and CLS affect user experience and page performance.
-
JavaScript Off-Main-Thread Patterns for Faster UIs
Learn JavaScript off-main-thread patterns with Web Workers, when to use them, how to share data safely, and common performance pitfalls.
JavaScript Engines & Internals
Follow how an engine runs your code, from the call stack to the optimizations it tries.
-
JavaScript Call Stack and Execution Context Explained
Learn how the JavaScript call stack and execution context work, how function calls are tracked, and why stack overflow errors happen.
-
JavaScript Event Loop Phases: Macrotasks vs Microtasks
Learn how the JavaScript event loop schedules macrotasks and microtasks, how execution order works, and why promises run before timers.
-
JavaScript Memory Model: Heap, Stack, and Garbage Collection
Learn how JavaScript uses the stack, heap, and garbage collection to store values, manage references, and avoid common memory bugs.
-
JavaScript JIT Optimizations: Hidden Classes and Inline Caching
Learn how JavaScript JIT optimizations work, including hidden classes and inline caching, and how to write code that runs faster.
-
JavaScript Deoptimization and Performance Traps Explained
Learn how JavaScript deoptimization happens, what triggers performance traps, and how to write code engines can optimize reliably.
Patterns & Architecture
Structure larger programs with the patterns JavaScript projects commonly use.
-
JavaScript MVC, MVVM & Other Architecture Patterns
Learn JavaScript MVC, MVVM, MVP, and related patterns: what they are, how they differ, when to use them, and common mistakes.
-
JavaScript Modularization and Code Splitting: A Practical Guide
Learn how JavaScript modularization and code splitting work, why they matter, and how to structure, load, and maintain faster apps.
-
JavaScript State Management Patterns: A Practical Guide
Learn JavaScript state management patterns, from local state to centralized stores, with examples, mistakes, and best practices.
-
JavaScript Functional Programming Principles: A Practical Guide
Learn JavaScript functional programming principles, including pure functions, immutability, composition, higher-order functions, and common.
-
JavaScript OOP Principles: Objects, Classes, and Inheritance
Learn JavaScript OOP principles, including objects, classes, inheritance, encapsulation, and polymorphism with practical ES2020+ examples.
TypeScript
Add static types to JavaScript and see how TypeScript describes functions, objects, and modules.
-
Why TypeScript? Benefits, Tradeoffs, and When to Use It
Learn why TypeScript is used, what problems it solves, how it improves JavaScript code, and when it may or may not be worth adopting.
-
TypeScript tsconfig and Setup: Configure a Project Correctly
Learn how tsconfig.json works, how to create a TypeScript setup, and how to configure compiler options, includes, excludes, and output.
-
TypeScript Basic Types: Strings, Numbers, Booleans, Arrays, and More
Learn TypeScript basic types, including strings, numbers, booleans, arrays, tuples, enums, any, unknown, void, and how to annotate values.
-
TypeScript Functions & Generics: Syntax, Examples, and Patterns
Learn TypeScript functions and generics with syntax, examples, common mistakes, and practical patterns for safer reusable code.
-
TypeScript Interfaces vs Type Aliases: Key Differences
Learn when to use TypeScript interfaces or type aliases, how they differ, and which one is best for objects, unions, extension, and.
-
TypeScript Classes & Decorators: Syntax, Uses, and Pitfalls
Learn TypeScript classes and decorators, how they work together, when to use them, and common mistakes to avoid in real projects.
-
TypeScript Modules & Project Structure: Organizing Code Cleanly
Learn how TypeScript modules and project structure work, how to split code across files, use imports and exports, and avoid common module.
Interoperability
Connect JavaScript to WebAssembly, native addons, and the two module systems still in use.
-
JavaScript WebAssembly Interop: Calling Wasm from JavaScript
Learn how JavaScript and WebAssembly interoperate, pass values, share memory, call exports, and avoid common integration mistakes.
-
Node.js C++ Addons with N-API: Build Native Extensions
Learn how Node.js C++ addons work with N-API, when to use them, how to build them, and common pitfalls when bridging native code and.
-
JavaScript ESM & CommonJS Interop: Importing Between Module Systems
Learn how JavaScript ESM and CommonJS interoperate, including import, export, require, default exports, named exports, and common pitfalls.
Framework Ecosystem (Overview)
Get a practical overview of React, Vue, Angular, and Svelte without treating any one of them as the language.
-
React Basics: Core Concepts, JSX, Components, and State
Learn React basics, including components, JSX, props, state, events, rendering, and common beginner mistakes in modern JavaScript.
-
Vue Basics: A Beginner's Guide to the Vue.js Framework
Learn Vue basics, including components, reactive data, directives, events, and templates, with clear examples for building interactive web.
-
Angular Basics: Core Concepts, Components, and Data Binding
Learn Angular basics, including components, templates, data binding, directives, services, and the app structure beginners need to start.
-
Svelte Basics: A Beginner’s Guide to Svelte Components and Reactivity
Learn Svelte basics, how components work, reactivity, bindings, and common mistakes so you can build fast web UIs with less code.
Error Handling
Recognize JavaScript's error types and decide how to report and log failures.
-
JavaScript Error Types: Error, TypeError, and RangeError
Learn JavaScript Error, TypeError, and RangeError: what each means, when to throw them, and how to fix common mistakes.
-
JavaScript Custom Errors: Creating and Throwing Your Own Errors
Learn how to create, throw, and handle custom errors in JavaScript, extend Error correctly, and build clearer error messages for debugging.
-
JavaScript Logging & Monitoring: Debugging and Observability Basics
Learn JavaScript logging and monitoring basics, from console methods and error logs to practical monitoring patterns for debugging web apps.
Core Rules of Thumb
Apply the habits that keep everyday JavaScript clear: block scope, explicit types, and small functions.
-
JavaScript Strict Mode: When and Why to Use It
Learn what JavaScript strict mode does, how to enable it, common errors it catches, and when to use it safely in modern code.
-
JavaScript const vs let vs var: Prefer const and let
Learn why JavaScript const and let are preferred over var, how scope and reassignment differ, and common mistakes to avoid.
-
JavaScript Avoid Implicit Coercion Pitfalls: Clear Rules
Learn how implicit coercion works in JavaScript, why it causes bugs, and how to write predictable comparisons, checks, and conversions.
-
JavaScript Favor Immutability: Why and How to Avoid Mutation
Learn why immutability matters in JavaScript, how to avoid mutation, and practical ways to create safer, easier-to-debug code.
-
JavaScript Keep Functions Small and Focused: Best Practices
Learn why small, focused JavaScript functions are easier to read, test, reuse, and debug, with examples, mistakes, and best practices.
-
JavaScript Handle Errors Early: Fail Fast and Simplify Control Flow
Learn how to handle JavaScript errors early with fail-fast checks, guard clauses, and clear error messages that simplify control flow.
-
JavaScript Readability Over Cleverness: Write Code People Can Maintain
Learn why readable JavaScript is better than clever code, how to simplify expressions, and how to write maintainable code teams can trust.
Appendix
Use the glossary, style notes, and migration guides when you need a reference rather than a lesson.
-
JavaScript Glossary: Essential JS Terms Explained
Learn essential JavaScript terms, symbols, and concepts with clear definitions, comparisons, and examples for beginners and intermediate.
-
JavaScript Common Mistakes and Best Practices
Learn JavaScript common mistakes, why they happen, and best practices for writing safer, clearer ES2020+ code with practical examples.
-
JavaScript Style Guides and Linters: Write Consistent Code
Learn what JavaScript style guides and linters do, how they differ, and how to use them to keep code consistent, readable, and error-free.
-
JavaScript Migration Guide: ES5 to ES2015+
Learn how to migrate JavaScript from ES5 to ES2015+, replace legacy syntax, avoid common breakages, and modernize code safely.
-
ECMAScript Specs and Proposals: Reading JavaScript's Future
Learn how ECMAScript specs and proposals work, how new JavaScript features are standardized, and how to track changes safely.
-
Contributing to JavaScript Open Source Projects: A Practical Guide
Learn how to contribute to JavaScript open source projects, from finding issues and making changes to tests, pull requests, and review.