projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
595509b
)
docs: Add note about global scope
author
Ryan Dahl
<ry@tinyclouds.org>
Mon, 17 Jan 2011 21:34:22 +0000
(13:34 -0800)
committer
Ryan Dahl
<ry@tinyclouds.org>
Mon, 17 Jan 2011 21:35:11 +0000
(13:35 -0800)
doc/api/globals.markdown
patch
|
blob
|
history
diff --git
a/doc/api/globals.markdown
b/doc/api/globals.markdown
index
db1850a
..
c671ed8
100644
(file)
--- a/
doc/api/globals.markdown
+++ b/
doc/api/globals.markdown
@@
-6,6
+6,11
@@
These object are available in the global scope and can be accessed from anywhere
The global namespace object.
+In browsers, the top-level scope is the global scope. That means that in
+browsers if you're in the global scope `var something` will define a global
+variable. In Node this is different. The top-level scope is not the global
+scope; `var something` inside a Node module will be local to that module.
+
### process
The process object. See the `'process object'` section.