How does the V8 engine optimize JavaScript code at runtime?

Heisenbug logo
TheHeisenBug

Search

Search across questions, learning content, and hands-on projects

Ace Your Next Tech Interview

5,986+ interview questions across 87 technologies — with expert answers, advanced search, AI-powered assistance, personal highlights, structured learning paths, and hands-on practice projects.

5,986+Questions & Answers
87Technologies
AdvancedSearch
Built-inAsk AI
PersonalHighlights
StructuredLearning Paths
Hands-onPractice Projects

Lifetime Access

One-time payment. No subscriptions. Unlock everything, forever.

$19.90USD

or R$49.90 BRL

FeatureFreePremium
Question titlesAllAll
Answers per topicTop 5All
Learning chaptersFirst 5All
Practice projectsFirst 3All
Highlights
Ask AI
Read tracking
Search

Node.js Interview Questions

  1. [JUNIOR] What is Node.js and how does it work?
  2. [JUNIOR] What is NPM and how do you use it to manage packages?
  3. [MID] What is the event loop in Node.js and how does it work?
  4. [JUNIOR] Why is Node.js single-threaded?
  5. [JUNIOR] What is the difference between synchronous and asynchronous functions in Node.js?
  6. [JUNIOR] What are callbacks in Node.js?
  7. [JUNIOR] What is the purpose of the package.json file?
  8. [MID] What is callback hell and how do you avoid it?
  9. [MID] How does async/await improve readability for asynchronous code?
  10. [MID] If Node.js is single-threaded, how does it handle concurrency?
  11. [SENIOR] How would you architect a scalable and maintainable Node.js application?
  12. [SENIOR] What are the phases of the Node.js event loop?
  13. [JUNIOR] What is the V8 engine and what role does it play in Node.js?
  14. [JUNIOR] How do you create a simple HTTP server in Node.js?
  15. [JUNIOR] What are Promises in Node.js and what problem do they solve?
  16. [JUNIOR] What is the difference between exports and module.exports?
  17. [MID] What are streams in Node.js and what types of streams exist?
  18. [MID] What is middleware in the context of Express.js?
  19. [MID] What is event-driven programming in Node.js?
  20. [MID] What is the difference between process.nextTick() and setImmediate()?
  21. [SENIOR] How does clustering improve the performance of a Node.js application?
  22. [SENIOR] How would you optimize the performance of a high-traffic Node.js API?
  23. [SENIOR] What is the purpose of the libuv library in Node.js?
  24. [SENIOR] How do you implement graceful shutdown in Node.js without dropping requests?
  25. [JUNIOR] What is a Buffer in Node.js and when would you use it?
  26. [JUNIOR] What is REPL in Node.js?
  27. [JUNIOR] How do you import a module using the require() function?
  28. [JUNIOR] What is the difference between blocking and non-blocking code execution?
  29. [JUNIOR] What are the different types of HTTP requests?
  30. [MID] What is the EventEmitter class and how does it work?
  31. [MID] What is piping in Node.js?
  32. [MID] What is the difference between spawn() and fork() methods in the child_process module?
  33. [MID] What is CORS and how do you handle it in a Node.js application?
  34. [MID] What is the purpose of the fs module and how do synchronous and asynchronous file operations differ?
  35. [MID] What are the advantages of using Express.js over the native HTTP module?
  36. [SENIOR] When would you use worker threads instead of child processes?
  37. [SENIOR] What are some common security vulnerabilities in Node.js applications and how do you mitigate them?
  38. [SENIOR] How do you manage secrets and configuration safely across environments?
  39. [SENIOR] How does Node.js handle garbage collection?
  40. [SENIOR] How would you implement rate limiting on a Node.js API?
  41. [EXPERT] How do you diagnose memory leaks in a Node.js application in production?
  42. [JUNIOR] What is an error-first callback pattern in Node.js?
  43. [JUNIOR] How do you install, update, and delete a dependency using NPM?
  44. [JUNIOR] What is the difference between local and global package installation?
  45. [MID] How do you handle errors in an Express.js application using error-handling middleware?
  46. [MID] What is the purpose of NODE_ENV and how do you use environment variables?
  47. [MID] What is the difference between query params, route params, and request body?
  48. [MID] How do you handle sessions and authentication in a Node.js application?
  49. [MID] What is the crypto module and what is it used for?
  50. [SENIOR] How do you implement secure HTTP headers in an Express.js application?
  51. [SENIOR] What is JWT and how does it work for authentication in Node.js?
  52. [SENIOR] What is a WebSocket and when would you use it over standard HTTP?
  53. [SENIOR] How do you implement a caching layer in a Node.js application?
  54. [SENIOR] How would you handle a large number of database connections efficiently?
  55. [EXPERT] How does the V8 engine optimize JavaScript code at runtime?
  56. [EXPERT] How do you decide between cluster and worker_threads for scaling a Node.js service?
  57. [EXPERT] What are common causes of event loop blocking and how do you detect them?
  58. [JUNIOR] How do you execute JavaScript code from a file in Node.js?
  59. [JUNIOR] What are some commonly used timing features of Node.js?
  60. [MID] What is a stub in Node.js testing?
  61. [MID] What is the role of express.Router() and why is it used?
  62. [MID] How do you read command line arguments in Node.js?
  63. [MID] What is the difference between setImmediate() and setTimeout(fn, 0)?
  64. [SENIOR] What is the significance of the Promise.all() and Promise.race() methods?
  65. [SENIOR] What is GraphQL and how does it compare to a REST API?
  66. [SENIOR] How do you handle centralized logging and correlation IDs across microservices?
  67. [SENIOR] What is backpressure in streams and what happens if you ignore it?
  68. [EXPERT] How do you design retries and timeouts to avoid retry storms in distributed systems?
  69. [EXPERT] How do you design circuit breakers, bulkheads, and fallbacks for resilient Node.js services?
  70. [EXPERT] How do you protect a Node.js server against DDoS attacks?
  71. [EXPERT] How do you implement zero-downtime deployments for a Node.js service?
  72. [MID] What are the exit codes of Node.js?
  73. [MID] Explain the concept of a test pyramid in Node.js?
  74. [SENIOR] What is the reactor pattern in Node.js?
  75. [SENIOR] What is Server-Side Rendering (SSR) with Node.js and why would you use it?
  76. [SENIOR] What is the significance of the zlib module?
  77. [EXPERT] What is WASI and why is it being introduced in Node.js?
  78. [EXPERT] How do you identify infinite loops, regex backtracking, or JSON.stringify hotspots in production?
  79. [EXPERT] How do you confirm a memory leak versus cache growth versus GC pressure?
  80. [EXPERT] What are the key differences between Bun, Deno, and Node.js?
  81. [EXPERT] How does the thread pool work internally and what are the implications for I/O-bound vs CPU-bound tasks?
  82. [EXPERT] What is the role of the net and dgram modules in Node.js?