1. What is Node.js?
Node.js is a runtime environment that allows executing JavaScript on the server side using Chrome’s V8 engine. It is used to build scalable and fast backend applications.
2. What are the features of Node.js?
- Non-blocking I/O
- Event-driven architecture
- Single-threaded
- Fast execution
- Scalable applications
3. What is the Event Loop?
The Event Loop is the core mechanism that handles asynchronous operations in Node.js. It allows non-blocking execution of code.
4. What is npm?
npm (Node Package Manager) is used to install, manage, and share Node.js packages.
5. What is a module in Node.js?
Modules are reusable blocks of code. Node.js has built-in modules like fs, http, path, etc.
6. What is require()?
require() is used to import modules in Node.js.
7. What is package.json?
It is a configuration file that contains project metadata and dependencies.
8. What is __dirname?
It gives the current directory path of the executing file.
9. What is __filename?
It gives the full path of the current file.
10. What is Buffer?
Buffer is used to handle binary data in Node.js.
11. What is asynchronous programming?
Async programming allows tasks to run without blocking execution.
12. What are callbacks?
Functions passed as arguments and executed after an operation completes.
13. What is callback hell?
Nested callbacks that make code difficult to read and maintain.
14. What are Promises?
Promises handle asynchronous operations with states: pending, fulfilled, rejected.
15. What is async/await?
Syntax to handle promises in a synchronous way.
16. What is the fs module?
Used for file system operations like reading/writing files.
17. What is the http module?
Used to create web servers in Node.js.
18. What is Express.js?
A web framework for Node.js to build APIs and web applications.
19. What is middleware?
Functions that run between request and response.
20. What is REST API?
API based on HTTP methods like GET, POST, PUT, DELETE.
21. What is EventEmitter?
Class used to handle events in Node.js.
22. What is stream?
Streams handle reading/writing data efficiently in chunks.
23. Types of streams?
Readable, Writable, Duplex, Transform.
24. What is piping?
Connecting streams using pipe() method.
25. What is cluster module?
Used to create child processes and utilize multi-core systems.
26. What is child process?
Used to run processes in parallel.
27. What is CORS?
Cross-Origin Resource Sharing allows requests from different domains.
28. What is JWT?
JSON Web Token used for authentication.
29. What is rate limiting?
Restricting number of requests to a server.
30. What is Helmet?
Security middleware for Express apps.
31. What is MongoDB?
NoSQL database used with Node.js.
32. What is Mongoose?
ODM library for MongoDB.
33. What is indexing?
Improves database query performance.
34. What is aggregation?
Used to process data records.
35. What is environment variable?
Used to store configuration values.
36. What is dotenv?
dotenv is a package used to load environment variables from a .env file into process.env for secure configuration.
37. What is process object?
process is a global object that provides information about the current Node.js process like environment, memory, and arguments.
38. What is process.env?
It stores environment variables such as API keys, database URLs, and configuration values.
39. What is synchronous vs asynchronous?
Synchronous code runs line by line, while asynchronous code executes without blocking the main thread.
40. What is blocking vs non-blocking?
Blocking code stops execution until task completes, while non-blocking allows other operations to run.
41. What is REPL?
REPL stands for Read-Eval-Print Loop. It is an interactive shell to run Node.js code.
42. What is global object?
Global object contains variables and functions available everywhere in Node.js.
43. What is setTimeout?
It executes a function after a specified delay.
44. What is setInterval?
It repeatedly executes a function at a fixed interval.
45. What is clearTimeout?
It stops a timeout set by setTimeout().
46. What is clearInterval?
It stops execution of setInterval().
47. What is os module?
Provides operating system-related information like CPU, memory, and platform.
48. What is path module?
Helps work with file and directory paths.
49. What is URL module?
Used to parse and handle URLs.
50. What is querystring?
Used to parse and format URL query strings.
51. What is crypto module?
Provides cryptographic functionality like hashing and encryption.
52. What is DNS module?
Used for DNS lookup and resolving domain names.
53. What is net module?
Used to create TCP servers and clients.
54. What is TLS module?
Used for secure communication using SSL/TLS.
55. What is zlib module?
Used for compression and decompression of data.
56. What is readline module?
Used to read input from command line.
57. What is console module?
Provides logging methods like console.log(), console.error().
58. What is util module?
Provides utility functions like formatting and debugging.
59. What is process.nextTick()?
Executes callback immediately after current operation, before event loop continues.
60. What is setImmediate()?
Executes callback after current event loop cycle.
61. What is difference between nextTick and setImmediate?
nextTick runs before event loop, setImmediate runs after event loop cycle.
62. What is memory leak?
Memory that is not released properly, causing performance issues.
63. What is garbage collection?
Automatic memory management that removes unused objects.
64. What is heap?
Memory area where objects are stored.
65. What is stack?
Memory area for function calls.
66. What is debugging in Node.js?
Process of finding and fixing errors using tools like debugger or console logs.
67. What is nodemon?
Tool that automatically restarts server when file changes.
68. What is linting?
Checking code for errors and formatting issues.
69. What is ESLint?
Tool for identifying and fixing JavaScript code issues.
70. What is Prettier?
Code formatter to maintain consistent style.
71. What is API testing?
Testing APIs using tools like Postman.
72. What is Postman?
Tool used to test APIs.
73. What is Thunder Client?
VS Code extension for API testing.
74. What is MVC architecture?
Model-View-Controller design pattern.
75. What is layered architecture?
Separates application into layers like controller, service, repository.
76. What is ORM?
Object Relational Mapping for database interaction.
77. What is Sequelize?
ORM for SQL databases in Node.js.
78. What is connection pooling?
Reusing database connections to improve performance.
79. What is transactions?
Ensures database operations are completed successfully or rolled back.
80. What is indexing in DB?
Improves query speed.
81. What is caching?
Storing frequently used data for faster access.
82. What is Redis?
In-memory database used for caching.
83. What is rate limiter?
Limits number of API requests.
84. What is logging system?
Stores logs for monitoring and debugging.
85. What is Winston?
Logging library for Node.js.
86. What is Morgan?
HTTP request logger middleware.
87. What is clustering?
Using multiple CPU cores for better performance.
88. What is load testing?
Testing system under heavy load.
89. What is stress testing?
Testing system limits beyond capacity.
90. What is load balancing?
Distributing traffic across servers.
91. What is Docker?
Containerization tool.
92. What is CI/CD?
Continuous Integration and Deployment.
93. What is PM2?
Process manager for Node.js apps.
94. What is logging?
Tracking application events.
95. What is debugging?
Finding and fixing errors.
96. What is scalability?
Ability to handle increased load.
97. What is microservices?
Architecture with small independent services.
98. What is monolithic architecture?
Single large application structure.
99. What is API gateway?
Manages API requests.
100. Why use Node.js?
Node.js is fast, scalable, uses JavaScript everywhere, and is ideal for real-time applications.
📢 Join Our WhatsApp Channel
💼 Get Daily IT Job Updates, Interview Preparation Tips & Instant Alerts directly on WhatsApp.
👉 Join WhatsApp Now📢 Join Our Telegram Channel
💼 Get Daily IT Job Updates, Interview Tips & Exclusive Alerts directly on Telegram!
👉 Join Telegram