Is Node.js a framework, a library, or a runtime? Explain.
Node.js is a runtime — specifically, a JavaScript runtime environment that lets you execute JavaScript outside the browser.
Why it's a runtime, not a framework or library:
Runtime — provides the environment to run code. Node includes the V8 engine, libuv (event loop and async I/O), and built-in modules like fs, http, and crypto.
Not a framework — it doesn't enforce structure or give you an opinionated way to build apps. Frameworks like Express, NestJS, or Fastify run on top of Node.
Not a library — libraries are code you call from your app (like Lodash). Node is the environment that runs your app in the first place.
This seems simple but many candidates confuse the terms. Be precise: Node.js is a runtime built on V8. Express is a framework.
Lodash is a library. Showing this clarity impresses interviewers.