JavaScript Cheat Sheets

Short, printable references for modern JavaScript and the tools around it. Each cheat sheet has its own page with every snippet ready to copy, plus a free PDF to keep next to your editor.

JavaScript Essentials

Preview of the JavaScript Cheat Sheet

JavaScript Cheat Sheet

Variables, types, strings, arrays, objects, functions, classes, modules, and async basics.

View Cheat Sheet »
Preview of the JavaScript for Pythonistas Cheat Sheet

JavaScript for Pythonistas Cheat Sheet

Python-to-JavaScript equivalents for None and null, numbers, f-strings, collections, truthiness, loops, classes, exceptions, async, modules, and common traps.

View Cheat Sheet »
Preview of the Array and Iterator Methods Cheat Sheet

Array and Iterator Methods Cheat Sheet

Map, filter, reduce, find, some, every, flat, non-mutating methods like toSorted and with, Object.groupBy, Array.from ranges, iterator helpers, and generators.

View Cheat Sheet »
Preview of the Async JavaScript Cheat Sheet

Async JavaScript Cheat Sheet

The event loop, promises, async/await, Promise combinators, error handling, fetch, AbortController, and async iteration.

View Cheat Sheet »
Preview of the JavaScript DOM Cheat Sheet

JavaScript DOM Cheat Sheet

querySelector, addEventListener and event delegation, classList, creating elements, forms and FormData, localStorage, and fetch from the browser.

View Cheat Sheet »
Preview of the JavaScript Gotchas Cheat Sheet

JavaScript Gotchas Cheat Sheet

Loose equality, typeof null, NaN, floating-point math, sort(), this binding, hoisting, reference equality, semicolon insertion, parseInt, for...in on arrays, string concatenation, Date months, shallow freeze, and array holes.

View Cheat Sheet »
Preview of the JavaScript Regex Cheat Sheet

JavaScript Regex Cheat Sheet

Regex literals, flags, character classes, named groups, lookarounds, match and replace methods, RegExp.escape, and lastIndex gotchas.

View Cheat Sheet »
Preview of the TypeScript Cheat Sheet

TypeScript Cheat Sheet

Type annotations and inference, interfaces vs. type aliases, unions and narrowing, generics, utility types, unknown and satisfies, tsconfig essentials, and running TypeScript in Node.js.

View Cheat Sheet »
Preview of the Node.js Files and Paths Cheat Sheet

Node.js Files and Paths Cheat Sheet

Paths with node:path, reading and writing text and JSON, listing and globbing, copying and deleting, file metadata, streams and pipeline, watch mode, and --env-file.

View Cheat Sheet »
Preview of the What's New in JavaScript (ES2026) Cheat Sheet

What's New in JavaScript (ES2026) Cheat Sheet

Map upsert, JSON.parse source text, Iterator.concat, Array.fromAsync, Base64 and hex bytes, Error.isError, and an ES2025 recap.

View Cheat Sheet »

npm and Security

Preview of the npm and package.json Cheat Sheet

npm and package.json Cheat Sheet

npm install and scripts, semver ranges, lock files and npm ci, ESM versus CommonJS, package.json metadata, and pnpm and Bun equivalents.

View Cheat Sheet »
Preview of the npm Supply Chain Security Cheat Sheet

npm Supply Chain Security Cheat Sheet

Lockfiles, install scripts, audits, dependency cooldowns, provenance, Trusted Publishing, incident response, and AI agent guardrails.

View Cheat Sheet »
Preview of the JavaScript Security Checklist Cheat Sheet

JavaScript Security Checklist Cheat Sheet

XSS and textContent, eval, prototype pollution, input validation with zod, secrets and env vars, node:crypto, CSP, CORS, and safe child processes.

View Cheat Sheet »

Developer Tools

Preview of the Git Cheat Sheet

Git Cheat Sheet

Setup, staging and commits, .gitignore, branches and merging, remotes, stash, and undoing mistakes.

View Cheat Sheet »
Preview of the Claude Code Cheat Sheet

Claude Code Cheat Sheet

Install and launch flags, headless mode, slash commands, shortcuts, CLAUDE.md, permissions, hooks, skills, subagents, and MCP.

View Cheat Sheet »
Preview of the Claude Code Hooks Cheat Sheet

Claude Code Hooks Cheat Sheet

Hook anatomy, lifecycle events, reading the event payload, exit codes, auto-formatting, notifications, and JSON replies.

View Cheat Sheet »
Preview of the LLM APIs and MCP in JavaScript Cheat Sheet

LLM APIs and MCP in JavaScript Cheat Sheet

Claude API calls in Node.js, streaming, tool use, structured output, retries, and building MCP servers and clients.

View Cheat Sheet »