Skip to content

Commit

Permalink
doc: add introduction sentence for CJS
Browse files Browse the repository at this point in the history
PR-URL: nodejs#42491
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com>
  • Loading branch information
aduh95 authored and xtx1130 committed Apr 25, 2022
1 parent 1f1f2cf commit c40ab27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c40ab27

Please sign in to comment.