JavaScript
Core JS concepts: closures, event loop, prototypes, and more.
Fundamentals
let, const, and var
Understanding the differences between var, let, and const declarations.
Data Types & Type Coercion
Primitive vs reference types, typeof quirks, loose vs strict equality, truthy/falsy values, and coercion gotchas.
Hoisting
How JavaScript moves declarations to the top of their scope before execution — var, let/const, functions, and the Temporal Dead Zone.
use strict
Strict mode makes it easier to write secure JavaScript by turning bad syntax into real errors.
Destructuring
Extracting values from objects and arrays into variables using concise syntax.
Spread & Rest Operators
The ... syntax serves two purposes — spread expands elements, rest collects them.
Template Literals
String interpolation, multi-line strings, and tagged templates using backtick syntax.
Functions
Arrow Functions
ES6 arrow functions allow shorter function syntax.
Higher-Order Functions
Functions that take other functions as arguments or return functions — the foundation of functional JavaScript.
Closures
A closure gives you access to an outer function's scope from an inner function.
Currying
Transformation of a function with multiple arguments into several functions of a single argument.
Memoization
Optimization technique that stores results of expensive function calls and returns cached results.
Call, Apply and Bind
Methods to explicitly set the 'this' context when calling functions.
IIFE (Immediately Invoked Function Expression)
Functions that run as soon as they are defined — used for scoping and avoiding global pollution.
Scope & Execution
Lexical Scope
A variable defined outside a function is accessible inside another function defined after the declaration.
Execution Context
How JavaScript creates and manages execution contexts with creation and execution phases.
The this Keyword
Understanding what 'this' refers to in different contexts — global, object, function, arrow, class, and event handlers.
Shallow Copy & Deep Copy
Understanding reference vs value copying in JavaScript arrays and objects.
Async JavaScript
Callbacks
Understanding callbacks — functions passed as arguments — and the problem of callback hell.
Promises
Understanding Promises — the modern way to handle asynchronous operations with then, catch, and chaining.
Async/Await
Writing asynchronous code that looks synchronous using async functions and the await keyword.
Promise Methods
Understanding Promise.all, Promise.allSettled, Promise.race, and Promise.any — when to use which.
Error Handling
Handling errors gracefully with try/catch/finally, custom errors, and async error patterns.
Event Loop
How JavaScript handles asynchronous operations through the call stack, callback queue, and microtask queue.
Debouncing and Throttling
Techniques to control how often a function is executed in response to rapid events.
Objects & Prototypes
Objects
Creating and working with objects — the building blocks of JavaScript.
Prototypal Inheritance
How JavaScript objects inherit from other objects through the prototype chain.
Classes
ES6 classes — a cleaner syntax for constructor functions, prototypes, and inheritance.
Iterators: for...in vs for...of
Understanding the difference between for...in (keys) and for...of (values) iteration in JavaScript.
Map & Set
Map, Set, WeakMap, and WeakSet — specialized collections for unique values and flexible key types.
DOM & Events
Events
JavaScript's interaction with HTML through events that occur when the user or browser manipulates a page.
Event Bindings
Binding events to HTML elements using addEventListener or onclick attribute.
Event Propagation, Bubbling and Capturing
How events travel through the DOM — capturing phase (parent to child), target phase, and bubbling phase (child to parent).
Event Delegation
A pattern to handle events efficiently by adding a single listener to a parent element.
DOM Manipulation
Selecting, creating, modifying, inserting, and removing elements from the DOM.
Web Storage & Cookies
Understanding localStorage, sessionStorage, and cookies — when to use which and how they differ.
ES6+ & Modern JS
Modules
Named exports, default exports, dynamic imports, and the difference between CommonJS and ES Modules.
Optional Chaining & Nullish Coalescing
Safely access nested properties with ?. and provide defaults with ?? without the pitfalls of ||.
Symbols
Unique, immutable primitives used as object keys that never collide — plus well-known symbols like Symbol.iterator.
Proxy & Reflect
Intercept and customize fundamental object operations with Proxy, and use Reflect for clean default behavior.
Patterns & Practice
Output-Based Questions
Classic 'What's the output?' interview questions covering hoisting, coercion, this, promises, typeof, and array gotchas.
Polyfills
Hand-written implementations of Array.prototype.map, filter, reduce, and Function.prototype.bind — a common interview ask.
Design Patterns
Module, Singleton, Observer, and Factory patterns in JavaScript — with practical examples and real-world usage.