Frontend Engineering
JavaScript & TypeScript
5 practice questions. Free questions open a full answer guide; the rest unlock with Pro.
- In a code review you see a function that logs A, schedules a setTimeout(...,0) that logs B, and resolves a Promise that logs C, all before logging D synchronously. A teammate expects the order A, B, C, D. Walk me through the actual order and why.
- Explain how the JavaScript event loop orders work — where do Promises, await, and setTimeout fall, and why does that ordering matter?Go Pro
- What's the difference between var, let, and const in JavaScript, and when would you use each?Go Pro
- What problem do closures solve in JavaScript, and what's a bug you've seen caused by misunderstanding how they capture variables?Go Pro
- You inherit a TypeScript codebase littered with the any type to silence compiler errors. A teammate argues unknown is just a stricter any and not worth the churn. How do you explain the real difference and when each belongs?Go Pro
Want questions matched to your role? Paste a job title, job description, or CV for a personalized set, or go Pro to unlock the full bank.