JavaScript Closures Explained (With Interview Questions)
Closures in plain English: lexical scope, how closures work, common interview traps (loops + setTimeout), and practical use cases like memoization and data hiding.
Practice
Search by concept, narrow to a roadmap, or pick a tag to focus on the exact topic you want to rehearse.
91 articles · page 9 of 11
Closures in plain English: lexical scope, how closures work, common interview traps (loops + setTimeout), and practical use cases like memoization and data hiding.
A practical, interview-focused guide to the JS event loop: call stack, Web APIs, task queues, microtasks vs macrotasks, and common trick questions with real examples.
clamp(), container queries, :has(), logical properties, and modern layout utilities.
How positioning works, stacking contexts, and what trips people up in interviews.
The interview classic: centering with flexbox, grid, absolute positioning, and margin auto.
Semantic HTML, keyboard navigation, focus management, labels, ARIA basics, and the accessibility mistakes interviewers look for.
How to build layouts that work across devices; practical breakpoint strategy.
Grid tracks, fr units, areas, and when Grid beats Flexbox.
Flex container vs items, main/cross axis, and alignment properties that interviewers ask about.