Hoisting 概念检查
概念检查 中等
题目
什么是 hoisting in JavaScript?
提示
Hoisting moves declarations, 不 assignments.
解释
Hoisting 是 JavaScript's behavior 的 moving 变量 and 函数 declarations 到顶部的 它们的 enclosing 作用域之前 code execution. var declarations 是 hoisted and initialized 到 undefined. 函数 declarations 是 fully hoisted (两者都 name and 请求体). let and const 是 hoisted 但 remain in temporal dead 区域直到它们的行. 仅 declarations 是 hoisted — assignments stay in 位置.
相关资源
相关课程
- JavaScript 变量
学习关于 hoisting.
查阅不认识的术语
新手友好的术语表用大白话解释编程术语——变量、函数、DOM、Promise 等等。
解读错误信息
用大白话解释常见错误——什么意思、为什么发生、如何修复。
动手做项目
通过引导式项目应用所学,含起始代码与解决方案。