All articles

Tagged: JavaScript

8 min read

JavaScript Promises: Taming Asynchronous Code

A complete, practical guide to Promises — what they are and the three states, creating and consuming them, chaining with .then/.catch/.finally, the combinators (all, allSettled, race, any), error propagation, microtask timing, and the common mistakes — with hands-on exercises and solutions.

JavaScriptPromisesAsyncFrontend
6 min read

Regular Expressions in JavaScript: Pattern Matching Without Fear

A practical guide to regex in JavaScript — literal vs constructor syntax, character classes, quantifiers, anchors, groups and alternation, flags, the string methods (test, match, matchAll, replace, split), capture and named groups, lookahead/lookbehind, and common pitfalls — with hands-on exercises and solutions.

JavaScriptRegexStringsAdvanced
6 min read

ES Modules & Modern Tooling: From Scripts to Apps

A practical guide to JavaScript modules and the build toolchain — named and default exports, import syntax, why modules have their own scope, static vs dynamic import, the module graph, npm and package.json, bundlers like Vite, and how a modern build works — with hands-on exercises and solutions.

JavaScriptModulesToolingFrontend
6 min read

Error Handling & Debugging: Failing Gracefully and Finding Bugs Fast

A practical guide to handling errors and debugging in JavaScript — try/catch/finally, the Error object and custom error classes, throwing well, async error handling, global handlers, and a working DevTools debugging toolkit (breakpoints, the call stack, console methods, source maps) — with hands-on exercises and solutions.

JavaScriptErrorsDebuggingAdvanced
8 min read

Closures, Scope & this: The Mechanics Behind JavaScript

A deeper guide to JavaScript's execution model — lexical scope and the scope chain, hoisting and the temporal dead zone, closures and the patterns they enable (private state, factories, memoization), the four rules of this, call/apply/bind, and arrow functions — with hands-on exercises and solutions.

JavaScriptClosuresScopeAdvanced
7 min read

Functional JavaScript: Pure Functions, Immutability & Composition

A practical guide to functional programming in JavaScript — pure functions and side effects, immutability and how to update data without mutation, first-class and higher-order functions, map/filter/reduce, composition and currying, and why this style underpins React — with hands-on exercises and solutions.

JavaScriptFunctionalImmutabilityAdvanced
6 min read

Browser Storage & State: localStorage, Cookies, IndexedDB & More

A practical guide to storing data in the browser — localStorage and sessionStorage, cookies and their flags, when to use each, IndexedDB for larger structured data, the Cache API, security and size limits, and patterns for persisting app state — with hands-on exercises and solutions.

JavaScriptStorageBrowserAdvanced
12 min read

The DOM: From Zero to Hero

A complete, practical guide to the Document Object Model — what the DOM really is, selecting and traversing nodes, reading and changing content, attributes vs properties, classes and styles, creating/inserting/removing elements, the event model (bubbling, delegation, preventDefault), forms, performance (reflow/repaint, fragments, debouncing), common mistakes, and hands-on exercises with solutions.

JavaScriptDOMBrowserFrontend
7 min read

JavaScript Performance & Memory: Fast, Smooth, Leak-Free

A practical guide to making JavaScript fast — the single-threaded model and avoiding main-thread blocking, debounce and throttle, memoization, efficient DOM updates and batching, memory leaks and how they happen, garbage collection, WeakMap/WeakSet, and measuring with DevTools — with hands-on exercises and solutions.

JavaScriptPerformanceMemoryAdvanced
7 min read

Prototypes, Classes & OOP in JavaScript

A practical guide to object-oriented JavaScript — the prototype chain and how property lookup works, constructor functions, the class syntax, methods and the prototype, inheritance with extends and super, static members, private #fields, getters/setters, and composition over inheritance — with hands-on exercises and solutions.

JavaScriptOOPClassesPrototypes
7 min read

Iterators & Generators: Lazy Sequences in JavaScript

A practical guide to JavaScript's iteration protocol — what makes something iterable, the iterator protocol, for...of and the spread operator, writing generator functions with function* and yield, lazy and infinite sequences, generator delegation, and async iterators — with hands-on exercises and solutions.

JavaScriptIteratorsGeneratorsAdvanced
7 min read

Async/Await: Asynchronous Code That Reads Like Synchronous

A complete, practical guide to async/await — how it builds on promises, the await keyword, error handling with try/catch, running tasks in parallel vs sequence, async functions always returning promises, top-level await, loops and async, and the common mistakes — with hands-on exercises and solutions.

JavaScriptAsyncPromisesFrontend
7 min read

TypeScript: A Practical Introduction for JavaScript Developers

A practical guide to TypeScript — why static types matter, basic and inferred types, interfaces and type aliases, unions and literals, generics, optional and readonly, narrowing, typing functions and async, and how it integrates into a real project — with hands-on exercises and solutions.

TypeScriptJavaScriptTypesAdvanced
7 min read

Fetch & HTTP: Talking to APIs from the Browser

A complete, practical guide to HTTP and the Fetch API — the request/response model, methods and status codes, headers, fetch with GET and POST, sending and parsing JSON, why fetch doesn't reject on 404, error handling, AbortController and timeouts, CORS, and the common mistakes — with hands-on exercises and solutions.

JavaScriptHTTPFetchAPIs
17 min read

JavaScript Fundamentals: From Zero to Hero

A complete, practical guide to the JavaScript every developer needs — how it runs, variables and scope, types and coercion, functions and closures, this, objects and arrays, destructuring, the event loop, promises and async/await, modules, the DOM, error handling, common mistakes, and hands-on exercises with solutions.

JavaScriptFundamentalsProgrammingFrontend
7 min read

Testing JavaScript: Confidence Through Automated Tests

A practical guide to testing JavaScript — why tests matter, unit vs integration vs end-to-end, the arrange-act-assert structure, writing tests with Vitest, assertions and matchers, mocking, testing async code, what to test (and what not to), and test-driven development — with hands-on exercises and solutions.

JavaScriptTestingVitestAdvanced