GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: update description of global · nodejs/node@13118a1

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • globals.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/globals.md‎

Copy file name to clipboardExpand all lines: doc/api/globals.md
+8-4Lines changed: 8 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,12 @@ added: v0.1.27
513513
514514
* {Object} The global namespace object.
515515

516-
In browsers, the top-level scope is the global scope. This means that
517-
within the browser `var something` will define a new global variable. In
518-
Node.js this is different. The top-level scope is not the global scope;
519-
`var something` inside a Node.js module will be local to that module.
516+
In browsers, the top-level scope has traditionally been the global scope. This
517+
means that `var something` will define a new global variable, except within
518+
ECMAScript modules. In Node.js, this is different. The top-level scope is not
519+
the global scope; `var something` inside a Node.js module will be local to that
520+
module, regardless of whether it is a [CommonJS module][] or an
521+
[ECMAScript module][].
520522

521523
## Class `Headers`
522524

@@ -982,6 +984,8 @@ added: v18.0.0
982984
983985
A browser-compatible implementation of [`WritableStreamDefaultWriter`][].
984986

987+
[CommonJS module]: modules.md
988+
[ECMAScript module]: esm.md
985989
[Web Crypto API]: webcrypto.md
986990
[`--no-experimental-fetch`]: cli.md#--no-experimental-fetch
987991
[`--no-experimental-global-customevent`]: cli.md#--no-experimental-global-customevent

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.