Node.js uses modules to organize code into reusable pieces. There are two types of modules in Node.js:
1. Built-in Modules
Node.js provides several built-in modules that you can use in your applications without needing to install anything.
const http = require('http');
http.createServer((req, res) => {
res.write('Hello, World!');
res.end();
}).listen(3000);
fs: Allows file system operations like reading/writing files.