File tree 1 file changed +15
-7
lines changed
1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -26,22 +26,30 @@ console.log(multiply(5,10)) // 50
26
26
## Scope
27
27
28
28
* Global scope
29
- * Local Scope
29
+ * Local scope
30
30
* Function scope
31
31
* Block scope
32
- * Function hoisting and scopes
33
- * Functions do not have access to each other's scopes
34
- * Nested scopes
32
+ * Function hoisting and scope
33
+ * Functions do not have access to each other's scope
34
+ * Nested scope
35
+
36
+ ** Global scope**
37
+
38
+ If a variable is declared outside all functions or curly braces ` ({}) ` , it is said to be defined in the global scope.
39
+
40
+ ``` javascript
41
+ const globalVariable = ' some value' ;
42
+ ```
35
43
36
44
## Closure
37
45
38
46
Clousure is the functions that have access to the parent scope, even when the parent function has closed.
39
47
40
48
For every closure there are 3 scopes:
41
49
42
- * Local Scope ( Own scope)
43
- * Outer Functions Scope
44
- * Global Scope.
50
+ * Local scope ( Own scope)
51
+ * Outer functions scope
52
+ * Global scope
45
53
46
54
## Function Delegates
47
55
You can’t perform that action at this time.
0 commit comments