🔰top-level scope
JS ⟩ concepts ⟩ scope ⟩ top-level
top-level scope relative to a JS file.
in Node.js:module scope ( top-level this ===
module.exports
)in browser:
script mode: global scope.
module mode: module scope
global variables don't get created by declaring variables in the top-level scope of a module (module scope).
Last updated