Declare variables and methods common difference

Disclaimer: If you have any objection to this article, then please write your comments in the article comments at. If you find this article interesting, please share and forward, or you can look at, you acknowledge and encouragement of our articles. Wish everyone in the programming this road, farther and farther. https://blog.csdn.net/weixin_44369568/article/details/91458282

1, declare variables

where

function

let

const

class

export

and let const

1, a variable declared valid only in the block where the let command

2, to enhance the variable does not exist

3, temporary dead zone

4, not allowed to repeat a statement

5, block-level scope

6, const actually guaranteed, not the value of the variable may not change, but the memory variable points to the
address stored number

7, top-level object of property

const declaration is constant
let statement is variable

Guess you like

Origin blog.csdn.net/weixin_44369568/article/details/91458282