JavaScript Complete Quick Reference: Modern Syntax, Methods & APIs Cheat Sheet

This JavaScript Quick Reference Guide compiles the essential methods, syntax patterns, keywords, and browser APIs into a high-density reference sheet for rapid revision and daily production development.

1. Variables & Declarations Quick Sheet

KeywordScopeReassignable?Hoisted?
constBlock ({})No (Immutable binding)Yes (in TDZ)
letBlock ({})YesYes (in TDZ)
var (Avoid)FunctionYesYes (with undefined)

2. Array Methods at a Glance

MethodMutates Original?ReturnsUse Case
push(...items)YESNew lengthAppend to end
pop()YESRemoved itemRemove from end
splice(start, count, ...items)YESDeleted items arrayArbitrary insert/delete
slice(start, end)NOShallow copy arrayExtract subarray
map(fn)NONew transformed arrayElement-wise transformation
filter(fn)NOFiltered subset arrayCondition-based selection
reduce(fn, init)NOAccumulated single valueSumming, aggregation
includes(item)NOBooleanExistence check

3. DOM & Event Reference

ActionStandard Syntax
Select Singledocument.querySelector(".class-or-id")
Select Multipledocument.querySelectorAll("selector")
Create Elementconst div = document.createElement("div")
Modify Textel.textContent = "Safe Text"
Toggle Classel.classList.toggle("active")
Add Listenerel.addEventListener("click", (e) => { ... })

4. Modern ES6 to ES2024+ Syntax Shortcuts

// Arrow Function:
const multiply = (x, y) => x * y;

// Object & Array Destructuring:
const { name, age } = user;
const [first, ...rest] = items;

// Spread / Rest Syntax:
const merged = { ...obj1, ...obj2 };

// Optional Chaining & Nullish Coalescing:
const userCity = user?.profile?.address?.city ?? "Default City";

// Async / Await:
const res = await fetch("https://api.veewom.com/data");
const json = await res.json();

Master Series Complete!

Congratulations! You have completed the comprehensive Veewom JavaScript 55-Class Master Curriculum. Return to the homepage to review any topic or explore our companion courses in PHP, Python, and Linux Programming: Return to JavaScript Tutorial Home →

Explore Related JavaScript Tutorials

Accelerate your JavaScript mastery by studying these tightly connected core tutorials:

Interview & Viva Q&A →

Comprehensive exam questions bank.

Practice Sessions →

Hands-on dry runs and output tracing.

Syntax & Grammar →

Fundamental language rules and conventions.

JavaScript Roadmap →

Complete master course navigation index.

Share Share on Facebook Share on Twitter Share on LinkedIn Pin on Pinterest Share on Stumbleupon Share on Tumblr Share on Reddit Share on Diggit

You may also like this!