ES6 let name variable summary

Time:2022-3-7

1 variable cannot duplicate name

Let star = ‘Leehom Wang’;
Let star = ‘Leehom Wang’// Error in declaring non repeatable lets
ES6 let name variable summary

2. There is a block level scope

{let star = ‘Leehom Wang’}
console.log(star);
ES6 let name variable summary
ES6 let name variable summary

3. No variable lifting

console.log(star)
Let star = ‘Leehom Wang’;
ES6 let name variable summary

4. It does not affect the scope chain

ES6 let name variable summary

This work adoptsCC agreementThe author, link and reprint of this article must be indicated