今日已更新 200 条资讯 | 累计 27375 条内容
关于我们

30 technical interview questions, explained the way you'd actually say them

Ramana Babu 2026年08月03日 11:05 1 次阅读 来源:Dev.to

30 Technical Interview Questions You Should Be Able to Explain Out Loud (JS / React / Node) Most interview prep content gives you a definition. Real interviews test something different: can you explain your reasoning clearly, out loud, under a little pressure — not just recite the right words. I put together 30 questions across JavaScript, React, and Node.js. Every answer here is written the way you'd actually say it in an interview, not the way a textbook would write it. How to actually use this: cover the answer, try explaining it out loud in under 30 seconds, then read the answer. If you froze or rambled, that's the real signal — more than whether you technically knew the concept. JavaScript Fundamentals 1. What's a closure, and why does it actually matter in real code? A closure is a function that remembers the variables from where it was created, even after that outer function has finished running. It powers private variables, debouncing, memoization, and module patterns. 2. setTimeout(fn, 0) vs Promise.then() — which runs first? The Promise wins. .then() callbacks go into the microtask queue, which fully drains before the next macrotask (like setTimeout ) runs — even with a 0ms delay. 3. Why does var break inside loops with closures, but let doesn't? var is function-scoped — every iteration shares the same variable. let is block-scoped, so each iteration gets its own fresh binding. 4. Where does == actually give you a different (and wrong) answer than === ? == does type coercion first — 0 == false and '' == 0 are both true. === compares type and value directly, no surprises. 5. Why does this break in callbacks with regular functions, but not arrow functions? Regular functions get this based on how they're called. Arrow functions inherit this lexically from where they were defined, so it stays consistent no matter how they're invoked. 6. If a property isn't on an object, where does JS look next? JS walks the prototype chain — the object, then its prototype, the

本文内容来源于互联网,版权归原作者所有
查看原文