Skip to content

Commit d4ffd26

Browse files
committed
Scope of the variables declared by Let Const and var in JS
1 parent 5d28e1d commit d4ffd26

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

scope.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
function f1()
2+
{
3+
var x=10;
4+
f2();
5+
function f2()
6+
{
7+
var b=100;
8+
f3();
9+
function f3()
10+
{
11+
console.log(a);
12+
13+
14+
}
15+
16+
}
17+
18+
}
19+
var a=100;
20+
f1();

0 commit comments

Comments
 (0)