es6: let var const difference

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/qq_34505202/article/details/84324068

1.const defined variables can not be modified, and must be initialized. constant

2.var defined variables can be modified, if not initialize prints undefined, does not complain.

3.let block-level scope is, let the internal function definitions used, no effect on the external function. Local variables

Guess you like

Origin blog.csdn.net/qq_34505202/article/details/84324068