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
| Keyword | Scope | Reassignable? | Hoisted? |
const | Block ({}) | No (Immutable binding) | Yes (in TDZ) |
let | Block ({}) | Yes | Yes (in TDZ) |
var (Avoid) | Function | Yes | Yes (with undefined) |
2. Array Methods at a Glance
| Method | Mutates Original? | Returns | Use Case |
push(...items) | YES | New length | Append to end |
pop() | YES | Removed item | Remove from end |
splice(start, count, ...items) | YES | Deleted items array | Arbitrary insert/delete |
slice(start, end) | NO | Shallow copy array | Extract subarray |
map(fn) | NO | New transformed array | Element-wise transformation |
filter(fn) | NO | Filtered subset array | Condition-based selection |
reduce(fn, init) | NO | Accumulated single value | Summing, aggregation |
includes(item) | NO | Boolean | Existence check |
3. DOM & Event Reference
| Action | Standard Syntax |
| Select Single | document.querySelector(".class-or-id") |
| Select Multiple | document.querySelectorAll("selector") |
| Create Element | const div = document.createElement("div") |
| Modify Text | el.textContent = "Safe Text" |
| Toggle Class | el.classList.toggle("active") |
| Add Listener | el.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 →