DEV Community

Discussion on: Is`let` the new `var` in Javascript?

Collapse
 
amitkhonde profile image
Amit Khonde

You use var inside blocks (like if-else and loops) also? There I use let because it will prevent accidental value changes in the variable.