← Back to all products
$15
JavaScript & TypeScript Reference
ES2024+ syntax, TypeScript types, DOM API, async patterns, module systems, and common utility snippets in one pack.
MarkdownJSONTypeScriptYAMLJavaScript
📄 Product Preview
Try the interactive reader and demo tools below, or get the full product with all content unlocked.
📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample📁 File Structure 3 files
javascript-typescript-reference/
├── LICENSE
├── README.md
└── config.example.yaml
📖 Documentation Preview README excerpt
JavaScript & TypeScript Reference
Complete reference pack covering ES2024+ syntax, TypeScript type system, DOM API, async patterns, module systems, and utility snippets. Built for professional developers who need instant answers.
Who Is This For?
- Full-stack developers working with modern JavaScript and TypeScript daily
- Backend developers picking up frontend or Node.js projects
- Engineers switching from other languages to the JS/TS ecosystem
- Anyone preparing for frontend or Node.js technical interviews
What's Inside
Cheatsheet Files (`cheatsheets/`)
| File | Topics Covered |
|---|---|
01-js-syntax-reference.md | Variables (let/const/var), operators, control flow, loops, destructuring, spread/rest, optional chaining, nullish coalescing, template literals |
02-functions-and-closures.md | Arrow functions, default params, rest params, closures, IIFE, higher-order functions, currying, this binding |
03-typescript-types.md | Basic types, interfaces, type aliases, generics, utility types, discriminated unions, mapped types, conditional types, template literal types |
04-async-patterns.md | Promises, async/await, Promise.all/allSettled/race/any, error handling, abort controllers, async generators, event loop model |
05-arrays-and-objects.md | Array methods, object methods, Map/Set/WeakMap/WeakRef, destructuring, structured clone, JSON handling |
06-dom-and-events.md | Selectors, element manipulation, event handling, delegation, intersection observer, mutation observer, custom events |
07-modules-and-tooling.md | ES modules, CommonJS, dynamic imports, top-level await, package.json fields, tsconfig essentials |
08-error-handling.md | try/catch/finally, custom errors, error types, async error handling, error boundaries concept, structured error patterns |
09-es2020-2024-features.md | Optional chaining, nullish coalescing, logical assignment, at(), structuredClone, Array.groupBy, decorators, using declarations |
10-utility-snippets.md | Debounce, throttle, deep clone, type guards, retry, pipe/compose, event emitter, LRU cache, UUID generation |
Example Files (`examples/`)
| File | Description |
|---|---|
async_patterns.js | Runnable async/await patterns with output comments |
typescript_types.ts | TypeScript type examples (requires tsc or ts-node) |
array_methods.js | Comprehensive array method demonstrations |
dom_manipulation.html | Self-contained HTML with DOM API examples |
utility_functions.js | Copy-paste utility function library |
Quick Reference (`cheatsheet.html`)
A single self-contained HTML file with the most essential tables for browser or print viewing.
How to Use
1. Unzip the archive
2. Browse cheatsheets/ -- each file covers one topic area
3. Open cheatsheet.html in a browser for a printable quick-reference
4. Run .js examples with node <filename>.js
5. TypeScript examples need tsc or ts-node (not included -- install via npm)
Format Notes
- All code targets ES2024 / TypeScript 5.x
- Node.js examples target v20+
- Tables follow:
Item | Description | Example - Each file is self-contained
Version History
| Version | Date | Changes |
... continues with setup instructions, usage examples, and more.
📄 Code Sample .js preview
examples/array_methods.js
// Array Methods - Complete Demo
// Run: node array_methods.js
const data = [
{ name: "Alice", age: 30, role: "admin" },
{ name: "Bob", age: 25, role: "user" },
{ name: "Charlie", age: 35, role: "admin" },
{ name: "Diana", age: 28, role: "user" },
{ name: "Eve", age: 32, role: "editor" },
];
console.log("=== ARRAY METHODS DEMO ===\n");
// map: transform
const names = data.map((u) => u.name);
console.log("map (names):", names);
// ["Alice", "Bob", "Charlie", "Diana", "Eve"]
// filter: select
const admins = data.filter((u) => u.role === "admin");
console.log("filter (admins):", admins.map((a) => a.name));
// ["Alice", "Charlie"]
// find: first match
const firstUser = data.find((u) => u.role === "user");
console.log("find (first user):", firstUser?.name);
// "Bob"
// findIndex
const idx = data.findIndex((u) => u.name === "Charlie");
console.log("findIndex (Charlie):", idx);
// 2
// some / every
console.log("some age > 30:", data.some((u) => u.age > 30)); // true
console.log("every age > 20:", data.every((u) => u.age > 20)); // true
// reduce: accumulate
const totalAge = data.reduce((sum, u) => sum + u.age, 0);
console.log("reduce (total age):", totalAge);
// 150
const avgAge = totalAge / data.length;
console.log("average age:", avgAge);
// 30
// Group by role (manual reduce)
const grouped = data.reduce((acc, u) => {
(acc[u.role] ??= []).push(u.name);
return acc;
# ... 49 more lines ...