doc: add introduction sentence for CJS

PR-URL: https://github.com/nodejs/node/pull/42491
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
This commit is contained in:
Antoine du Hamel
2022-04-02 20:29:22 +02:00
committed by GitHub
parent 18bd02f245
commit 2dea9ccd8a

View File

@@ -6,7 +6,11 @@
<!--name=module-->
In the Node.js module system, each file is treated as a separate module. For
CommonJS modules are the original way to package JavaScript code for Node.js.
Node.js also supports the [ECMAScript modules][] standard used by browsers
and other JavaScript runtimes.
In Node.js, each file is treated as a separate module. For
example, consider a file named `foo.js`:
```js