for loop in ES6 | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

for loop in ES6

I did not know you can start a for loop with ā€œletā€ variable. I thought it can only be a ā€œvarā€.

18th Dec 2019, 2:59 AM
thecity2201
thecity2201 - avatar
3 Respostas
+ 1
If you use `let`, the variable will only be recognised within the loop. But if you use `var` the variable will be recognised within and outside loop scope.
18th Dec 2019, 5:52 AM
Ipang
+ 1
i thought ā€œletā€ was boolean type.
18th Dec 2019, 5:53 AM
thecity2201
thecity2201 - avatar
0
theres key to create a variable var , let , const
1st Aug 2020, 12:17 PM
Nihar Kunder
Nihar Kunder - avatar