Subject revision

JavaScript

JavaScript language, browser, and Node.js interview recall cards.

Clear

Results update as you type. Press / to jump straight into search.

JavaScript cards

43 cards

JavaScript Medium Theory

API and network basics in JavaScript: fetch, XMLHttpRequest, HTTP methods, JSON responses, and error handling in API calls

Frontend and Node.js code often call APIs using `fetch` today, but interviews still expect you to know HTTP basics and sometimes older XHR patterns.

  • Know common HTTP methods
  • `fetch` returns a promise
  • HTTP errors and network failures are not the same thing

API and network basics in JavaScript: fetch, XMLHttpRequest, HTTP methods, JSON responses, and error handling in API calls

JavaScript Medium Theory

Arithmetic, comparison, logical, ternary, nullish coalescing, optional chaining, and short-circuit operators

JavaScript operators cover math, comparisons, boolean logic, fallback values, safe property access, and concise branching.

  • `??` differs from `||`
  • Optional chaining stops on nullish access
  • Short-circuiting affects evaluation

Arithmetic, comparison, logical, ternary, nullish coalescing, optional chaining, and short-circuit operators

JavaScript Hard Theory

Asynchronous JavaScript: callbacks, callback hell, promises, promise states, promise chaining, async/await, try/catch with async, Promise.all, Promise.allSettled, Promise.race, and Promise.any

Modern async JavaScript is built on promises and `async`/`await`, but you still need to understand callbacks and promise coordination helpers.

  • Promises are pending, fulfilled, or rejected
  • `async` functions return promises
  • Promise combinators solve different coordination problems

Asynchronous JavaScript: callbacks, callback hell, promises, promise states, promise chaining, async/await, try/catch with async, Promise.all, Promise.allSettled, Promise.race, and Promise.any

JavaScript Medium Theory

Class syntax, constructor, instance methods, static methods, inheritance, super, encapsulation basics, and polymorphism basics in JavaScript

JavaScript classes provide cleaner syntax over prototype-based behavior, including constructors, instance methods, inheritance, and static members.

  • `class` is syntax over prototypes
  • `super` reaches parent behavior
  • Encapsulation and polymorphism are design ideas, not just keywords

Class syntax, constructor, instance methods, static methods, inheritance, super, encapsulation basics, and polymorphism basics in JavaScript

JavaScript Medium Theory

Constructor functions, prototypes, and the prototype chain in JavaScript

Before class syntax, constructor functions and prototypes were the main way to share behavior, and that model still exists underneath modern classes.

  • Functions can act as constructors
  • Shared methods usually live on the prototype
  • Property lookup follows the prototype chain

Constructor functions, prototypes, and the prototype chain in JavaScript