1.let,const 有變量提高 2.let,const的變量提高標註了暫時性死區的開始 3.你在暫時性死區裏使用,js就會報錯git
13.3.1 Let and Const Declarations let and const declarations define variables that are scoped to the running execution context's LexicalEnvironment. The variables are created when their containing Lexical Environment is instantiated but may not be accessed in any way until the variable's LexicalBinding is evaluated.es6
18.2.1.2 Runtime Semantics: EvalDeclarationInstantiation( body, varEnv, lexEnv, strict) The environment of with statements cannot contain any lexical declaration so it doesn't need to be checked for var/let hoisting conflicts.github
1.咱們應該關注的是暫時性死區,不要在暫時性死區的時候去使用。lua
2.提高不如說是暫時性死區的開始get
3.從let出現那一刻開始,let暫時性死區開始,直到被初始化undefined或者賦值結束it
4.其實每一個人都有本身的理解,寫好代碼不出錯是硬道理io
1.知乎專欄上的一篇解釋ast
2.你不知道的jsclass
3.你不知道的jspdf