Flashcards · JavaScript · Free
JavaScript flashcards, generated for you.
Example JavaScript study cards to learn from right now — then generate a full set from your own notes (plus a practice quiz) and export to Quizlet or Anki. Free, no account needed.
Example JavaScript flashcards
What are the three ways to declare variables in JavaScript?
var (function-scoped, hoisted), let (block-scoped, not hoisted to TDZ), const (block-scoped, not hoisted to TDZ, cannot reassign)
What is the difference between == and ===?
== performs type coercion before comparison; === checks both value and type without coercion. Always use === unless you explicitly need coercion.
What is hoisting in JavaScript?
Declarations are moved to the top of their scope during compilation. var declarations are hoisted and initialized as undefined; let/const are hoisted but not initialized (Temporal Dead Zone).
Explain the difference between null and undefined.
undefined means a variable has been declared but not assigned a value, or a function has no return statement. null is an intentional assignment representing 'no value' (it's an object type bug in JS).
What does 'this' refer to in JavaScript?
'this' refers to the object that invoked the current function. In global scope it's the window/global object; in methods it's the object; in arrow functions it's inherited from parent scope; in strict mode it's undefined.
What's the difference between arrow functions and regular functions?
Arrow functions: no own 'this' (inherit from closure), no arguments object, no prototype, cannot use new. Regular functions: have their own 'this' based on how they're called, have arguments object, have prototype.
What is a closure?
A function that has access to variables from its lexical parent scope, even after the parent function returns. Created whenever a function is declared; allows data privacy and function factories.
What is event delegation and why use it?
Attaching a single event listener to a parent element to handle events on its children by checking event.target. Benefits: reduced memory usage, handles dynamically added elements, cleaner code.
Explain the difference between async/await and Promises.
async/await is syntactic sugar over Promises. async makes a function return a Promise; await pauses execution until the Promise resolves. Makes asynchronous code look/read like synchronous code; try/catch can handle rejections.
What is the event loop and how does it handle the call stack vs. callback queue?
Event loop repeatedly checks if call stack is empty; if so, it moves the first callback from the callback queue to the call stack. setTimeout/fetch/events go to callback/microtask queue, not immediately to stack. Microtasks (Promises) run before macrotasks (setTimeout).
Make your own JavaScript study set
Flashcards for related topics
Studying JavaScript to build with AI? MindloomHQ turns it into real skills — structured courses, agent projects, and certificates.
Explore MindloomHQ →