Node.js Modules Explained from Scratch — Why Do Modules Even Exist?

If you've been writing Node.js for even a few days, you've probably seen code like this:

const fs = require("fs");

const express = require("express");

const path = require("path");