JavaScript
Modern JavaScript — language features, patterns, and the runtime gotchas that catch real teams.
Browse all 76 articles ↓All JavaScript articles
76 articles in this topic.
JavaScript Service Workers and PWA Basics: Offline Caching, Background Tasks, Push
Lesson 11.4 of the JavaScript tutorial — Service Workers from the ground up: lifecycle, the Cache API, the five caching strategies, Workbox,…
JavaScript Web Components Basics: Custom Elements, Shadow DOM, and Slots
Lesson 11.3 of the JavaScript tutorial — Web Components from the ground up: Custom Elements, lifecycle, properties vs attributes, Shadow DOM…
JavaScript Observer APIs: IntersectionObserver, ResizeObserver, MutationObserver
Lesson 11.2 of the JavaScript tutorial — IntersectionObserver, ResizeObserver, MutationObserver, and PerformanceObserver. The event-driven p…
JavaScript IndexedDB Explained: The Browser’s Real Database
Lesson 11.1 of the JavaScript tutorial — IndexedDB explained: the mental model, the verbose native API, the idb library that hides it, schem…
JavaScript Web Workers: Running Code on a Separate Thread
Lesson 10.4 of the JavaScript tutorial — Web Workers in depth: separate threads, postMessage and structured cloning, transferables, what's a…
JavaScript Streams API: ReadableStream, WritableStream, TransformStream
Lesson 10.3 of the JavaScript tutorial — the Web Streams API: ReadableStream, WritableStream, TransformStream, piping, backpressure, built-i…
JavaScript Async Iteration and for-await-of: Streaming Data Chunk by Chunk
Lesson 10.2 of the JavaScript tutorial — async iteration and for-await-of: the AsyncIterable protocol, async generators (`async function*`),…
JavaScript Proxy and Reflect: Meta-Programming, Reactivity, and How Vue and MobX Work
Lesson 10.1 of the JavaScript tutorial — Proxy and Reflect explained: the 5 most-used traps, a working 30-line reactivity system, why Vue an…
JavaScript Regex Real-World Patterns: Validation, Parsing, and Find/Replace Recipes
Lesson 9.3 of the JavaScript tutorial — real-world regex patterns: validation (email, URL, phone, UUID), parsing (URLs, dates, logs), find/r…
JavaScript Modern Regex Features: Lookarounds, Named Groups, Unicode Properties
Lesson 9.2 of the JavaScript tutorial — modern regex features: lookaheads/lookbehinds, named capture groups, Unicode property escapes, the s…
JavaScript Regex Syntax Basics: Patterns, Flags, and the Methods That Use Them
Lesson 9.1 of the JavaScript tutorial — regex syntax basics: character classes, shorthand classes, quantifiers (greedy and lazy), anchors, g…
JavaScript JSON Deep Dive: parse, stringify, Reviver/Replacer, and the Edge Cases
Lesson 8.4 of the JavaScript tutorial — JSON.parse and JSON.stringify in depth, the reviver/replacer callbacks, edge cases (undefined, Dates…
JavaScript Dates and Intl: Working with Time, Time Zones, and Internationalization
Lesson 8.3 of the JavaScript tutorial — the JavaScript Date object's quirks (0-indexed months, parsing gotchas), the modern Intl API for for…
JavaScript Numbers, Math, and BigInt: IEEE 754, Precision, and When to Use What
Lesson 8.2 of the JavaScript tutorial — the IEEE 754 mechanics behind number, why 0.1+0.2 isn't 0.3, the safe-integer threshold, when to rea…
JavaScript Strings Deep Dive: Methods, Templates, Unicode, and the Methods You Actually Need
Lesson 8.1 of the JavaScript tutorial — the string methods worth knowing, template literals and tagged templates, the UTF-16 surrogate-pair …
JavaScript ES Modules Explained: import, export, and the Modern Module System
Lesson 6.1 of the JavaScript tutorial — ES modules in depth: named vs default exports, dynamic import(), top-level await, live bindings, the…
JavaScript async/await Explained: How It Really Works (and How to Use It Well)
Lesson 5.3 of the JavaScript tutorial — async/await in depth: what async/await actually do, error handling with try/catch, the sequential-vs…
JavaScript Callbacks and the Pre-Promise Era: Why Async Needed Promises
Lesson 5.1 of the JavaScript tutorial — what callbacks are, the error-first Node.js convention, callback hell and the pyramid of doom, why P…
JavaScript Function Parameters and Arguments: Defaults, Rest, Destructuring
Lesson 2.2 of the JavaScript tutorial — function parameters in depth: default values, rest parameters, destructuring in the signature, the l…
JavaScript Function Declarations vs Expressions vs Arrows: When to Use Which
Lesson 2.1 of the JavaScript tutorial — the three function syntaxes (declaration, expression, arrow) and their differences: hoisting, this b…
JavaScript Mixins and Composition: When Inheritance is the Wrong Tool
Lesson 4.5 of the JavaScript tutorial — why composition (HAS-A) beats inheritance (IS-A), how to build mixins as plain objects or class-retu…
JavaScript Private Fields and Static Members: True Encapsulation with #name and static
Lesson 4.4 of the JavaScript tutorial — private fields and methods with the # syntax, static private fields, static blocks for class-level i…
JavaScript Classes Explained: Constructors, Methods, Inheritance, and the Desugaring Story
Lesson 4.2 of the JavaScript tutorial — JavaScript classes in depth: constructors, methods, field syntax, static members, inheritance with e…
JavaScript Property Descriptors and defineProperty: Writable, Enumerable, Configurable, and Getters/Setters
Lesson 3.4 of the JavaScript tutorial — property descriptors (value, writable, enumerable, configurable), getters and setters, Object.freeze…
JavaScript Spread and Destructuring: The Modern Way to Compose and Unpack Data
Lesson 3.3 of the JavaScript tutorial — spread (...) for arrays, objects, and function calls; destructuring for arrays and objects; defaults…
JavaScript Array Methods Cheatsheet: map, filter, reduce, and the Modern Toolkit
Lesson 3.2 of the JavaScript tutorial — the full array-method toolkit: map, filter, reduce, find, some, every, the new immutable ones (toSor…
JavaScript Object Fundamentals: Literals, Properties, Methods, and Shorthand Syntax
Lesson 3.1 of the JavaScript tutorial — creating objects (literal, Object.create, class), reading/writing properties, modern shorthand synta…
The JavaScript Fetch API and Network Requests: Modern HTTP from the Browser
Lesson 7.4 of the JavaScript tutorial — the Fetch API, request/response, the famous res.ok gotcha, sending JSON and FormData bodies, AbortCo…
JavaScript localStorage and sessionStorage: When to Use Each (and When Not To)
Lesson 7.5 of the JavaScript tutorial — localStorage and sessionStorage in depth: API, lifetimes, synchronicity, security (why XSS makes the…
JavaScript Forms and Form Validation: FormData, Constraint API, and Modern Patterns
Lesson 7.3 of the JavaScript tutorial — modern HTML forms, collecting input with FormData, validating with the Constraint Validation API, th…
JavaScript Events and Event Delegation: addEventListener, Bubbling, and Delegation
Lesson 7.2 of the JavaScript tutorial — addEventListener, the bubbling/capturing model, event delegation as the modern pattern that replaces…
JavaScript DOM Basics: Selecting, Reading, and Modifying the Page
Lesson 7.1 of the JavaScript tutorial — what the DOM is, how to select elements with querySelector, read and write content safely (textConte…
JavaScript Basic Functions: Declarations, Calls, Return Values, and Arguments
Lesson 1.7 of the JavaScript tutorial — function declarations vs expressions vs arrows, parameters and arguments, default and rest params, r…
JavaScript Loops Explained: for, while, for-of, for-in — When to Use Which
Lesson 1.6 of the JavaScript tutorial — every loop construct (for, while, for-of, for-in), when to reach for each one, the classic mid-itera…
JavaScript Conditional Statements: if, else, ternary, switch — and the Modern Alternatives
Lesson 1.5 of the JavaScript tutorial — if/else, ternary, switch, short-circuit conditionals, plus the lookup-object and early-return patter…
JavaScript Operators Explained: Arithmetic, Comparison, Logical, and the Modern Ones
Lesson 1.4 of the JavaScript tutorial — every operator category (arithmetic, comparison, logical, bitwise, assignment) plus the four modern …
JavaScript Data Types Explained: All 8 Types and the `typeof` Quirks
Lesson 1.3 of the JavaScript tutorial — the 8 data types (7 primitives + 1 object category), the difference between value-passed primitives …
JavaScript Variables: let, const, and var — The Practical Differences in 2026
Lesson 1.2 of the JavaScript tutorial — what var, let, and const really do, the five-dimension comparison (scope, hoisting, reassignment, re…
What is JavaScript and Where it Runs: A 2026 Developer’s Guide
Lesson 1.1 of the JavaScript tutorial — the difference between JavaScript the language and ECMAScript the spec, what engines vs hosts actual…
JavaScript ES2024+ Features Worth Using (and What to Skip)
Modern JS syntax cheat sheet: ES2023 immutable array methods (toSorted, toReversed, findLast), ES2024 Object.groupBy + Promise.withResolvers…
JavaScript Higher-Order Functions and Composition: pipe() and compose()
Higher-order functions take or return functions — the foundation of map/filter/reduce, pipe/compose, partial application, and currying. With…
JavaScript Pure Functions and Side Effects: The Gateway to Functional JS
A pure function is deterministic + side-effect-free. Why purity makes code testable, memoizable, parallelizable, and easy to reason about. T…
JavaScript Iterators and Generators: Building Lazy Sequences
JavaScript's iterator protocol (next() returning { value, done }) and Symbol.iterator make for...of work. Generators (function*) build itera…
JavaScript Symbols Explained: The Identifier Type Almost No One Uses
Symbols are JavaScript's 7th primitive — guaranteed-unique values usable as object keys, hidden from Object.keys/for-in/JSON. Well-known Sym…
JavaScript Inheritance Patterns: Classes vs Composition vs Mixins
Three JS inheritance patterns: class extends for true IS-A hierarchies, composition (the default — wins most of the time), and mixins as cla…
JavaScript Prototypes and the Prototype Chain Explained (with `class` Decoded)
JavaScript is prototype-based wearing a class costume. How [[Prototype]] works, the chain lookup, Object.create vs new, how `class` decompil…
JavaScript Error Handling Patterns: try/catch, Result Types, and async/await
try/catch only catches synchronous throws inside the try block. Async callbacks, uncaught promises, and event handlers all need different pa…
JavaScript WeakMap, WeakSet, and WeakRef: When Regular Maps Hold On Forever
WeakMap, WeakSet, and WeakRef let you reference objects without keeping them alive. Restrictions, use cases (DOM annotation, private fields,…
JavaScript Memory and Garbage Collection: Why Your SPA Leaks
How V8's generational mark-and-sweep collector actually works, the 4 classic leak patterns in SPAs (forgotten listeners, over-capturing clos…
Build a JavaScript Promise from Scratch: How `then`, Chaining, and Microtasks Actually Work
Build a Promise from scratch in 60 lines. State machine (pending → fulfilled / rejected), why callbacks run as microtasks, how chaining work…
The JavaScript Event Loop, Microtasks vs Macrotasks (with Timing Examples)
The event loop coordinates JavaScript's single call stack with the microtask and macrotask queues. Why Promise.then always runs before setTi…
JavaScript Type Coercion and Equality: Why `[] == ![]` is `true`
JavaScript coercion isn't chaos — it's a small set of rules. To-number/to-string/to-boolean tables, `==` vs `===`, why `[] == ![]` is `true`…
The JavaScript `this` Keyword: All 5 Binding Rules in One Place
`this` follows 5 binding rules: default, implicit, explicit, new, and arrow (lexical). The one-sentence summary, the precedence ladder, and …
JavaScript Closures: The Definitive Guide (with 7 Production Patterns)
Closures are simply lexical scope + first-class functions. A function bundled with a reference to its outer environment that keeps captured …
JavaScript Lexical Scope: How the Engine Resolves Every Variable
Lexical scope means variable accessibility is fixed by where the code is written, not where it is called from. The scope chain, block vs fun…
JavaScript Hoisting Explained: var, let, const, and Functions in 2026
Hoisting in JavaScript is NOT "declarations being moved to the top of the file." It's the engine reserving memory before your code runs — an…
JavaScript Execution Context and the Call Stack: The Mental Model You Need
Every JavaScript bug ultimately traces back to one mental model — the execution context and the call stack. Here's the picture every JS deve…
Understanding JavaScript Module Systems: CommonJS, AMD, and ES6 Modules
Link copied Understanding JavaScript Module Systems: CommonJS, AMD, and ES6 Modules JavaScript modules are fundamental for writing clean, ma…
Mastering JavaScript Media Events: A Professional Guide with Full Code Examples
Link copied Mastering JavaScript Media Events: A Professional Guide with Full Code Examples JavaScript media events are essential tools for …
Understanding JavaScript Events
Link copied Understanding JavaScript Events JavaScript events are at the heart of dynamic and interactive web development. They enable devel…
Mastering Currying Functions in JavaScript
Link copied Mastering Currying Functions in JavaScript Currying is a fundamental concept in functional programming that can transform how yo…
How to Make Sequential API Calls in JavaScript: Promises vs Observables
Link copied How to Make Sequential API Calls in JavaScript: Promises vs Observables Calling Multiple APIs Sequentially in JavaScript # When …
Exploring Optional Chaining in JavaScript
Link copied Exploring Optional Chaining in JavaScript Optional chaining is a syntax feature that allows you to safely access deeply nested o…
How to flatten Object in JavaScript ?
Link copied How to flatten Object in JavaScript ? Flattening an object is not a standard defined in JavaScript, however, it is commonly…
JavaScript Array Iteration Methods
Link copied JavaScript Array Iteration Methods JavaScript offers a robust set of array manipulation methods that streamline the way develop…
SOLID Principles in JavaScript
Link copied SOLID Principles in JavaScript When it comes to writing clean and maintainable code, the SOLID principles are often heralded as …
Web Workers and Service Workers
Link copied Web Workers and Service Workers In the realm of web development, optimizing performance and providing a seamless user experience…
Understanding Mutability and Immutability in JavaScript
Link copied Understanding Mutability and Immutability in JavaScript Introduction:JavaScript, as a versatile and dynamic programming language…
Optimizing JavaScript Object Manipulation Techniques
Link copied Optimizing JavaScript Object Manipulation Techniques Introduction: # JavaScript offers several techniques for efficiently work…
Understanding let vs const in JavaScript:
Link copied Understanding let vs const in JavaScript: Introduction:In modern JavaScript, let and const are two keywords used for variable de…
Array Flattening in JavaScript: Best Methods and Techniques for Efficient Code
Link copied Array Flattening in JavaScript: Best Methods and Techniques for Efficient Code Flattening an array in JavaScript is a common tas…
Unlocking the Power of Async/Await in JavaScript: Beyond Syntactic Sugar
Link copied Unlocking the Power of Async/Await in JavaScript: Beyond Syntactic Sugar Is Async/Await Just Syntactic Sugar in JavaScript? # In…
Exploring structuredClone() Method in JavaScript: Deep Dive into Object Cloning
Link copied Exploring structuredClone() Method in JavaScript: Deep Dive into Object Cloning Introduction: # JavaScript, being a versatile la…
Deciphering the Elegant Syntactic Sugar of Async/Await in JavaScript
Link copied Deciphering the Elegant Syntactic Sugar of Async/Await in JavaScript In the ever-evolving landscape of JavaScript, developers ar…
Level Up Your JavaScript: Decoding the Power of Spread and Rest Operators
Link copied Level Up Your JavaScript: Decoding the Power of Spread and Rest Operators In the realm of JavaScript, two operators reign suprem…
Learning Javascript RoadMap, Unlock Your Web Development Potential:
Link copied Learning Javascript RoadMap, Unlock Your Web Development Potential: Unlocking the Power and Versatility of the Web's Essential L…