Es6 Let Const
1. Block-level scope
ES5 only has global scope and function scope, but no block-level scope.
Variables declared outside the function are global variables, which can easily lead to variable conflicts. Therefore, we have to use execute function immediately to avoid conflicts with global variables. In addition, variables used for counting within the loop will also be leaked into global variables.
To this end, ES6 introduces the concept of block-level scope.
