JavaScript

JavaScript · Browse articles by tag (only tags with 5+ articles get a page).

ProgrammingBeginnerSeries 5

Essential JavaScript Array Methods

Split the array API into methods that mutate and methods that return a new array, then use map, filter, reduce, find and some correctly, including sort's string default.

ProgrammingIntermediateSeries 2

JavaScript Async and Promises

Why 1 4 3 2 is the correct order, promise states and chaining, async/await error handling, serial versus parallel work, the four combinators, and concurrency limits.

ProgrammingIntermediateSeries 2

JavaScript Practice: a Frontend App Without a Framework

A reading list in plain JavaScript: one state object plus a render function, event delegation, localStorage with validation and migration, form errors, and keyboard access.

ProgrammingIntermediateSeries 1

JavaScript Practice: a Node.js CLI Tool

Build linkscan: parse arguments with parseArgs, walk Markdown files, probe external links with bounded concurrency, print machine-readable output, and return real exit codes.

ProgrammingBeginnerSeries 3

JavaScript Conditionals and Loops

Pick between if, switch, for, for...of and while with intent, and avoid the iteration bugs: fall-through cases, for...in on arrays, and break inside forEach.

ProgrammingIntermediateSeries 4

JavaScript DOM and Events

Selecting and creating nodes, batching updates, capture and bubble, event delegation, listener cleanup with AbortSignal, form handling, and the XSS risk in innerHTML.

ProgrammingBeginnerSeries 8

JavaScript Error Handling

What an Error carries, when to throw, how try/catch/finally runs, custom error classes with instanceof, the cause option, and why async errors escape try/catch.

ProgrammingIntermediateSeries 3

JavaScript fetch and HTTP in Practice

fetch does not reject on 404, a body can be read once, timeouts need AbortSignal, retries need backoff, and browsers add CORS on top of all of it.

ProgrammingBeginnerSeries 4

JavaScript Functions, Scope and Closures

Compare declarations, expressions and arrow functions, use default and rest parameters, and understand scope chains, closures, and the classic var-in-a-loop trap.

ProgrammingIntermediateSeries 1

JavaScript Modules: ESM and CommonJS

Named and default exports, live bindings, dynamic import, the CommonJS snapshot trap, interop rules in Node, the exports map, and how to break a cycle.

ProgrammingBeginnerSeries 6

JavaScript Objects and Destructuring

Object literals, property access and iteration, destructuring with renames and defaults, and why spreading gives you a shallow copy that still shares nested objects.

ProgrammingBeginnerSeries 2

JavaScript Operators and Type Coercion

Why == surprises you, which eight values are falsy, how + and - coerce differently, and when to reach for ??, ?. and Number.isNaN().

ProgrammingBeginnerSeries 7

JavaScript Strings and Template Literals

Template literal interpolation, string immutability, UTF-16 length surprises, slice versus substring, and why replace() only changes the first match.

ProgrammingIntermediateSeries 6

Testing JavaScript with Vitest

Set up Vitest, pick the right assertion, test async code with fake timers, replace dependencies with vi.fn and vi.mock, and enforce coverage in CI.

ProgrammingIntermediateSeries 5

JavaScript Tooling: npm, Vite and Linting

package.json fields that matter, lockfiles and npm ci, script conventions, Vite dev versus build, why VITE_ variables are public, and ESLint versus Prettier.

ProgrammingBeginnerSeries 1

JavaScript Variables: var, let and const

How var, let and const differ in scope, hoisting and rebinding, what the temporal dead zone protects you from, and why typeof null returns "object".