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”.

12/18/2019 2:59:50 AM

ROLF__

2 Answers

New Answer

+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.

+1

i thought “let” was boolean type.