Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStatsPractice TestsCertifications

Categories

🎓 Certifications
🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
CheatGrid
HomeAboutTopicsPricingMy VaultStatsPractice TestsCertifications
LVLEVEL 0
0/5 XP
GitHub
© 2026 CheatGrid™. All rights reserved.
Privacy PolicyTerms of UseAboutContact

JavaScript Cheat Sheet

JavaScript Cheat Sheet

Back to Programming Languages
Updated 2026-05-25
Next Topic: JSON Cheat Sheet

JavaScript is a dynamic, prototype-based programming language standardized as ECMAScript and used across browsers, servers (Node.js), and embedded runtimes. This cheat sheet covers the most-used language constructs, standard library APIs, and core Web/Node primitives — from everyday ES2015+ syntax through the newest ES2025/2026 features such as Iterator helpers, Set methods, explicit resource management, RegExp.escape, and Promise.try. Examples are intentionally minimal and runnable, emphasizing correct modern syntax, predictable semantics, and common pitfalls. Use the links in the first column as the source of truth for behavior, edge cases, and compatibility.

What This Cheat Sheet Covers

This topic spans 16 focused tables and 241 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: Core Types & EqualityTable 2: Declarations, Scope, and GlobalsTable 3: Functions and thisTable 4: Destructuring, Spread & PatternsTable 5: Objects, Prototypes, and ClassesTable 6: Arrays, Sets, and MapsTable 7: Iteration, Iterables, and GeneratorsTable 8: Strings and Regular ExpressionsTable 9: Control Flow, Operators, and ErrorsTable 10: Promises and AsyncTable 11: Modules and LoadingTable 12: Fetch and HTTP PrimitivesTable 13: DOM Events and StorageTable 14: Workers, Service Workers, and CachingTable 15: Node.js Runtime and I/OTable 16: Metaprogramming and Advanced Built-ins

Table 1: Core Types & Equality

Every JavaScript value belongs to one of the eight primitive types or to Object. Understanding the difference between reference types and primitives, the two equality algorithms (== vs === vs Object.is), and the quirks of typeof null prevents a large class of subtle bugs.

TypeExampleDescription
typeof
typeof "hello" → "string"
• Returns a string naming the primitive type
• typeof null === "object" is a legacy bug
Number
0.1 + 0.2 !== 0.3
• IEEE-754 64-bit floating point
• all integers ≤ 2^53−1 are exact
BigInt
9007199254740992n + 1n
• Arbitrary-precision integers
• append n
• cannot mix with Number without explicit conversion
String
"café".length → 5
• Immutable UTF-16 code-unit sequence
• emoji/surrogate pairs may need for...of or [...str] to iterate
Boolean
Boolean(0) → false
Only false, 0, "", null, undefined, NaN, 0n are falsy.
null
let x = null
• Intentional absence of value
• typeof null is "object" (legacy spec error).
undefined
let y; y === undefined
• Uninitialized variable or missing property
• distinct from null.
Symbol
Symbol("id") !== Symbol("id")
• Always unique primitive
• used for metaprogramming hooks and collision-free property keys

More in Programming Languages

  • Java Cheat Sheet
  • JSON Cheat Sheet
  • Arrays & Strings Cheat Sheet
  • Julia Programming Language Cheat Sheet
  • Python Libraries Cheat Sheet
  • TOML Configuration Format Cheat Sheet
View all 31 topics in Programming Languages