The difference between var and let
Others
2021-01-26 17:21:16
views: null
1. Variables declared by let are no longer promoted, and must be declared before use.
2. The global variable declared by let is no longer a property of the window object
3. In the same scope, it is not allowed to use let to declare a variable repeatedly
4. The variable declared by let has a block-level scope, which can only be valid in the current block
Origin blog.csdn.net/ni15534789894/article/details/113051563