Skip to content

Commit 5cff306

Browse files
committed
Scope in javascript
1 parent bd96e37 commit 5cff306

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

03_basics/02_scope.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var c = 300
2+
let a =400
3+
if(true){
4+
let a= 10
5+
const b =20
6+
var c =30
7+
console.log("Inner: ",a);//10
8+
}
9+
console.log(a)//400
10+
console.log(c)//30
11+
console.log(b)//error

0 commit comments

Comments
 (0)