Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

module scope javascript

In JavaScript, scopes are created by code blocks, functions, modules.
While const and let variables are scoped by code blocks, functions or modules,
var variables are scoped only by functions or modules.
Scopes can be nested.
Inside an inner scope you can access the variables of an outer scope.
 
PREVIOUS NEXT
Tagged: #module #scope #javascript
ADD COMMENT
Topic
Name
4+1 =