JavaScript Essentials Cheat Sheet

1. Variables & Scope

Use let for block-scoped variables, const for constants, avoid var. Understand function scope, block scope, and closure concepts for proper variable management.

2. Functions

Function declarations, expressions, arrow functions, IIFE (Immediately Invoked Function Expressions). Arrow functions don't bind 'this' - useful for callbacks.

3. Promises & Async/Await

Promises handle async operations with .then() and .catch(). Async/await provides cleaner syntax. Use Promise.all() for parallel operations, Promise.race() for first completion.

4. Array Methods

map() transforms arrays, filter() selects elements, reduce() accumulates values, forEach() iterates, find() locates elements, some()/every() test conditions.

5. ES6+ Features

Destructuring for extracting values, spread operator (...) for copying/merging, template literals for strings, default parameters, rest parameters, classes, modules.