<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ramana Babu</title>
    <description>The latest articles on DEV Community by Ramana Babu (@ramana_babu_c787073206bef).</description>
    <link>https://dev.to/ramana_babu_c787073206bef</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4059768%2F4ae696d0-b3a3-40b4-9914-99c619421b41.png</url>
      <title>DEV Community: Ramana Babu</title>
      <link>https://dev.to/ramana_babu_c787073206bef</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ramana_babu_c787073206bef"/>
    <language>en</language>
    <item>
      <title>30 technical interview questions, explained the way you'd actually say them</title>
      <dc:creator>Ramana Babu</dc:creator>
      <pubDate>Mon, 03 Aug 2026 03:05:35 +0000</pubDate>
      <link>https://dev.to/ramana_babu_c787073206bef/30-technical-interview-questions-explained-the-way-youd-actually-say-them-4a3g</link>
      <guid>https://dev.to/ramana_babu_c787073206bef/30-technical-interview-questions-explained-the-way-youd-actually-say-them-4a3g</guid>
      <description>&lt;h1&gt;
  
  
  30 Technical Interview Questions You Should Be Able to Explain Out Loud (JS / React / Node)
&lt;/h1&gt;

&lt;p&gt;Most interview prep content gives you a definition. Real interviews test&lt;br&gt;
something different: can you explain your reasoning clearly, out loud,&lt;br&gt;
under a little pressure — not just recite the right words.&lt;/p&gt;

&lt;p&gt;I put together 30 questions across JavaScript, React, and Node.js. Every&lt;br&gt;
answer here is written the way you'd actually say it in an interview, not&lt;br&gt;
the way a textbook would write it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to actually use this:&lt;/strong&gt; cover the answer, try explaining it out&lt;br&gt;
loud in under 30 seconds, &lt;em&gt;then&lt;/em&gt; read the answer. If you froze or&lt;br&gt;
rambled, that's the real signal — more than whether you technically knew&lt;br&gt;
the concept.&lt;/p&gt;




&lt;h2&gt;
  
  
  JavaScript Fundamentals
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. What's a closure, and why does it actually matter in real code?
&lt;/h3&gt;

&lt;p&gt;A closure is a function that remembers the variables from where it was&lt;br&gt;
created, even after that outer function has finished running. It powers&lt;br&gt;
private variables, debouncing, memoization, and module patterns.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;code&gt;setTimeout(fn, 0)&lt;/code&gt; vs &lt;code&gt;Promise.then()&lt;/code&gt; — which runs first?
&lt;/h3&gt;

&lt;p&gt;The Promise wins. &lt;code&gt;.then()&lt;/code&gt; callbacks go into the microtask queue, which&lt;br&gt;
fully drains before the next macrotask (like &lt;code&gt;setTimeout&lt;/code&gt;) runs — even&lt;br&gt;
with a 0ms delay.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Why does &lt;code&gt;var&lt;/code&gt; break inside loops with closures, but &lt;code&gt;let&lt;/code&gt; doesn't?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;var&lt;/code&gt; is function-scoped — every iteration shares the same variable.&lt;br&gt;
&lt;code&gt;let&lt;/code&gt; is block-scoped, so each iteration gets its own fresh binding.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Where does &lt;code&gt;==&lt;/code&gt; actually give you a different (and wrong) answer than &lt;code&gt;===&lt;/code&gt;?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;==&lt;/code&gt; does type coercion first — &lt;code&gt;0 == false&lt;/code&gt; and &lt;code&gt;'' == 0&lt;/code&gt; are both&lt;br&gt;
true. &lt;code&gt;===&lt;/code&gt; compares type and value directly, no surprises.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Why does &lt;code&gt;this&lt;/code&gt; break in callbacks with regular functions, but not arrow functions?
&lt;/h3&gt;

&lt;p&gt;Regular functions get &lt;code&gt;this&lt;/code&gt; based on how they're called. Arrow&lt;br&gt;
functions inherit &lt;code&gt;this&lt;/code&gt; lexically from where they were defined, so it&lt;br&gt;
stays consistent no matter how they're invoked.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. If a property isn't on an object, where does JS look next?
&lt;/h3&gt;

&lt;p&gt;JS walks the prototype chain — the object, then its prototype, then&lt;br&gt;
that prototype's prototype — until it's found or it hits &lt;code&gt;null&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Search-as-you-type vs. a scroll listener — debounce or throttle for each?
&lt;/h3&gt;

&lt;p&gt;Search wants &lt;strong&gt;debounce&lt;/strong&gt; — fire once after typing stops. Scroll wants&lt;br&gt;
&lt;strong&gt;throttle&lt;/strong&gt; — fire at a steady max rate continuously.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. When do you use &lt;code&gt;Promise.all&lt;/code&gt; vs &lt;code&gt;Promise.race&lt;/code&gt;?
&lt;/h3&gt;

&lt;p&gt;Use &lt;code&gt;all&lt;/code&gt; when you need every result, and it should reject if any fail.&lt;br&gt;
Use &lt;code&gt;race&lt;/code&gt; when you only care about whichever resolves first.&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Why can you call some functions before they're written in your code, but not others?
&lt;/h3&gt;

&lt;p&gt;Function declarations fully hoist. &lt;code&gt;const fn = () =&amp;gt; {}&lt;/code&gt; only hoists&lt;br&gt;
the declaration, not the assignment, so calling it early throws.&lt;/p&gt;

&lt;h3&gt;
  
  
  10. What's currying, and when would you actually reach for it?
&lt;/h3&gt;

&lt;p&gt;Currying transforms &lt;code&gt;f(a,b,c)&lt;/code&gt; into &lt;code&gt;f(a)(b)(c)&lt;/code&gt;. It's useful for&lt;br&gt;
creating reusable, partially-configured functions.&lt;/p&gt;




&lt;h2&gt;
  
  
  React
&lt;/h2&gt;

&lt;h3&gt;
  
  
  11. Why is updating the Virtual DOM actually faster than updating the real DOM directly?
&lt;/h3&gt;

&lt;p&gt;React batches changes, diffs the old and new virtual trees, and only&lt;br&gt;
touches the specific real DOM nodes that actually changed.&lt;/p&gt;

&lt;h3&gt;
  
  
  12. What happens if you leave the dependency array off &lt;code&gt;useEffect&lt;/code&gt; completely?
&lt;/h3&gt;

&lt;p&gt;The effect runs after every single render — a common source of&lt;br&gt;
infinite loops if the effect itself updates state.&lt;/p&gt;

&lt;h3&gt;
  
  
  13. Call &lt;code&gt;setState&lt;/code&gt; 3 times in one event handler — does React re-render 3 times?
&lt;/h3&gt;

&lt;p&gt;No. React batches updates within the same handler into a single&lt;br&gt;
re-render, and React 18 extends this batching further.&lt;/p&gt;

&lt;h3&gt;
  
  
  14. Why does using array index as a &lt;code&gt;key&lt;/code&gt; break things when a list reorders?
&lt;/h3&gt;

&lt;p&gt;React matches elements between renders by &lt;code&gt;key&lt;/code&gt;. Using the index means&lt;br&gt;
React thinks the item &lt;em&gt;at that position&lt;/em&gt; changed, not that it moved.&lt;/p&gt;

&lt;h3&gt;
  
  
  15. Controlled vs. uncontrolled inputs — what's the actual difference?
&lt;/h3&gt;

&lt;p&gt;A controlled input's value lives in React state and updates via&lt;br&gt;
&lt;code&gt;onChange&lt;/code&gt;. An uncontrolled input's value is managed by the DOM itself,&lt;br&gt;
read via a &lt;code&gt;ref&lt;/code&gt; when needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  16. &lt;code&gt;useMemo&lt;/code&gt; vs. &lt;code&gt;useCallback&lt;/code&gt; — what's the actual difference in what gets memoized?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;useMemo&lt;/code&gt; memoizes a computed value. &lt;code&gt;useCallback&lt;/code&gt; memoizes the&lt;br&gt;
function itself — useful for stable references passed to memoized&lt;br&gt;
children.&lt;/p&gt;

&lt;h3&gt;
  
  
  17. When is Context actually the wrong tool, even though it fixes prop drilling?
&lt;/h3&gt;

&lt;p&gt;Context re-renders every consumer on any value change — bad for&lt;br&gt;
frequently-changing state. It's best for rarely-changing global data&lt;br&gt;
like theme or auth.&lt;/p&gt;

&lt;h3&gt;
  
  
  18. You wrapped a component in &lt;code&gt;React.memo&lt;/code&gt;, but it's still re-rendering every time. Why?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;React.memo&lt;/code&gt; does a shallow prop comparison. A new object, array, or&lt;br&gt;
function reference each render looks different even if the underlying&lt;br&gt;
data is the same.&lt;/p&gt;

&lt;h3&gt;
  
  
  19. What actually makes something a "custom hook" versus just a regular function?
&lt;/h3&gt;

&lt;p&gt;A function whose name starts with &lt;code&gt;use&lt;/code&gt; and that calls other hooks&lt;br&gt;
inside it. The naming convention is how React's linter enforces the&lt;br&gt;
rules of hooks.&lt;/p&gt;

&lt;h3&gt;
  
  
  20. Why doesn't a normal &lt;code&gt;try/catch&lt;/code&gt; work for catching rendering errors in React?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;try/catch&lt;/code&gt; only catches synchronous errors in code you directly run.&lt;br&gt;
Error Boundaries hook into React's own lifecycle to catch errors during&lt;br&gt;
rendering.&lt;/p&gt;




&lt;h2&gt;
  
  
  Node.js Backend
&lt;/h2&gt;

&lt;h3&gt;
  
  
  21. Node is single-threaded. So how does it handle thousands of concurrent requests?
&lt;/h3&gt;

&lt;p&gt;JavaScript execution is single-threaded, but I/O operations get&lt;br&gt;
delegated to a thread pool. The event loop picks up completed I/O and&lt;br&gt;
runs the callbacks, never blocking on the wait.&lt;/p&gt;

&lt;h3&gt;
  
  
  22. Why use a stream instead of reading a large file fully into memory first?
&lt;/h3&gt;

&lt;p&gt;Reading the whole file into memory holds it all in RAM per request.&lt;br&gt;
Streams process and send data in small chunks, keeping memory usage&lt;br&gt;
flat regardless of file size.&lt;/p&gt;

&lt;h3&gt;
  
  
  23. What does &lt;code&gt;next()&lt;/code&gt; actually do in Express middleware, and what breaks if you forget it?
&lt;/h3&gt;

&lt;p&gt;It passes control to the next handler in the chain. Forget it, and the&lt;br&gt;
request just hangs forever with no response ever sent.&lt;/p&gt;

&lt;h3&gt;
  
  
  24. If a JWT gets stolen, can you just "log the user out" like a normal session?
&lt;/h3&gt;

&lt;p&gt;Not easily. JWTs are stateless, so you'd need extra infrastructure like&lt;br&gt;
a blocklist or short expiry with refresh tokens to revoke one early.&lt;/p&gt;

&lt;h3&gt;
  
  
  25. Async/await is just Promise syntax sugar. So why does it feel so different to write?
&lt;/h3&gt;

&lt;p&gt;It lets asynchronous code read top-to-bottom like synchronous code,&lt;br&gt;
with normal &lt;code&gt;try/catch&lt;/code&gt; for errors — much easier to reason about than&lt;br&gt;
chained callbacks.&lt;/p&gt;

&lt;h3&gt;
  
  
  26. Node is single-threaded. So how do you actually use multiple CPU cores?
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;cluster&lt;/code&gt; module forks multiple copies of the process across&lt;br&gt;
cores, sharing the same port, so incoming requests get distributed&lt;br&gt;
across the workers.&lt;/p&gt;

&lt;h3&gt;
  
  
  27. Why is committing a &lt;code&gt;.env&lt;/code&gt; file to Git a serious mistake, not just messy?
&lt;/h3&gt;

&lt;p&gt;It usually holds real secrets. Once committed, it's in the Git history&lt;br&gt;
permanently — deleting the file later doesn't remove the old commits.&lt;/p&gt;

&lt;h3&gt;
  
  
  28. What's actually wrong with using &lt;code&gt;GET&lt;/code&gt; to delete a resource, even if it technically works?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;GET&lt;/code&gt; is supposed to be safe and idempotent. Browsers and crawlers can&lt;br&gt;
pre-fetch &lt;code&gt;GET&lt;/code&gt; URLs, which could accidentally trigger a deletion.&lt;/p&gt;

&lt;h3&gt;
  
  
  29. Why does Express error-handling middleware need exactly 4 parameters instead of the usual 3?
&lt;/h3&gt;

&lt;p&gt;Express checks a function's parameter count to identify it as an error&lt;br&gt;
handler. A 4-argument signature is specifically what signals that role.&lt;/p&gt;

&lt;h3&gt;
  
  
  30. Same &lt;code&gt;package.json&lt;/code&gt;, same &lt;code&gt;npm install&lt;/code&gt; — can two people end up with different dependency versions?
&lt;/h3&gt;

&lt;p&gt;Yes, without a &lt;code&gt;package-lock.json&lt;/code&gt;. Version ranges can resolve&lt;br&gt;
differently over time, and the lockfile pins exact versions for&lt;br&gt;
reproducible installs.&lt;/p&gt;




&lt;h2&gt;
  
  
  If you actually want to practice explaining these out loud
&lt;/h2&gt;

&lt;p&gt;Reading an answer and being able to say it clearly under pressure are&lt;br&gt;
two different skills. I've been building &lt;a href="https://sparlog.com" rel="noopener noreferrer"&gt;Sparlog&lt;/a&gt;&lt;br&gt;
— an AI that actually interviews you: you explain your reasoning out&lt;br&gt;
loud while writing code, and it scores clarity and correctness&lt;br&gt;
together, the way a real interviewer would.&lt;/p&gt;

&lt;p&gt;It's free to try, currently in open beta. Would genuinely love feedback&lt;br&gt;
if you give it a shot.&lt;/p&gt;

&lt;p&gt;Also made a free downloadable PDF version of this list if you'd rather&lt;br&gt;
have it offline: &lt;a href="https://sparlog.com/resources" rel="noopener noreferrer"&gt;sparlog.com/resources&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>career</category>
      <category>interview</category>
    </item>
  </channel>
</rss>
