Interview prep
JavaScript Interview Questions
JavaScript interviews test the event loop, closures and asynchronous control flow before any framework specifics.
Questions and answers
01Explain the event loop.
The call stack runs synchronously; completed async work queues callbacks. Microtasks (promises) drain fully after each task, before the next macrotask (timers, IO), which is why a promise chain runs before a setTimeout(0).
02What is a closure and where does it bite you?
A closure captures variables from its defining scope. The classic bug is capturing a loop variable declared with var — every callback sees the final value; let creates a fresh binding per iteration.
03Difference between == and ===?
== applies type coercion before comparing; === compares type and value. Use === unless you deliberately want null and undefined to compare equal.
04How does prototypal inheritance work?
Objects hold a link to a prototype object; property lookup walks that chain until it finds a match. class syntax is sugar over the same mechanism.
05What is the difference between debounce and throttle?
Debounce delays execution until activity stops — good for search input. Throttle guarantees at most one call per interval — good for scroll and resize handlers.
How to answer these well
Interviewers are not grading recall — they are checking whether you've hit the failure mode the question describes. Anchor every answer to something you actually shipped or debugged with JavaScript.
Say the trade-off out loud. "I'd use X here, but it costs Y under Z conditions" scores higher than a clean textbook definition every time.
Roles asking for JavaScript
- PT Front End Retail CoordinatorTJX Companies · Easley, SC 29640onsitemidPosted 10 mins ago
- FT Retail Front End CoordinatorTJX Companies · Easley, SC 29640onsitemidPosted 10 mins ago
- Front End Customer Experience Coordinator/Supervisor, Experience and Open Availability RequiredTJX Companies · Dickson, TN 37055onsitemidPosted 10 mins ago
- TJ Maxx Retail Merchandise and Front End AssociateTJX Companies · Austin, TX 78759onsiteentryPosted 10 mins ago
- Retail Front end coordinatorTJX Companies · Burlington, VT 05401onsitemidPosted 10 mins ago
- Pharmacy Technician - Front End Part TimeCVS · MO - SpringfieldonsitemidPosted 19 mins ago
- Pharmacy Technician - Front End Night ShiftCVS · OH - PerrysburgonsitemidPosted 19 mins ago
- Executive Team Leader Service & Engagement (Assistant Manager Front End) - Meridian, IDtarget · 3591 W. Cobalt Drive, Meridian,ID 83642onsitemidPosted 50 mins ago
- Retail Front End CoordinatorTJX Companies · Brookfield, WI 53045onsitemidPosted 1 day ago
- Manufacturing Equipment Technician (MTE) - Front End Nights Shift - Shift 4Intel · US, Arizona, PhoenixonsitemidPosted 1 day ago
Related prep
- Frontend Engineer jobs
- Frontend Engineer career guide
- Full Stack Engineer jobs
- Full Stack Engineer career guide
- Python interview questions
- Java interview questions
- React interview questions
- AWS interview questions
- Azure interview questions
- Kubernetes interview questions
- Docker interview questions
- Terraform interview questions