Skip to content

Commit 9894f8d

Browse files
committed
var vs const
1 parent d2fb323 commit 9894f8d

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

revision/rev3.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
const check=()=>{
3+
for (let i=0;i<5;i++){
4+
console.log(i)
5+
}
6+
console.log("hello", i)
7+
}
8+
check()
9+
10+
//functiobnally scoped var
11+
// const check=()=>{
12+
// for (var i=0;i<5;i++){
13+
// console.log(i)
14+
// }
15+
// console.log("hello", i)
16+
// }
17+
// check()

0 commit comments

Comments
 (0)