where
There is variable promotion
function
There is variable promotion. In es6 browsers, it is best not to use function declarations in block-level scopes, and use expressions
let
Temporary dead zone, no variable promotion, no longer a property of the top-level object, the global object is decoupled from the top-level object
const
Temporary dead zone, no variable promotion, constant definition, once declared, must be assigned immediately, no longer a property of the top-level object, the global object is decoupled from the top-level object
import
class