“Что такое временная мертвая зона” Ответ

Временная мертвая зона

let totalPrice = coursePrice * 1.18;     //---------
                                         //         | ------>  this is TDZ for coursePrice
                                         //         |
console.log(totalPrice);                 //---------

let coursePrice = 699;
sani sahani

Что такое временная мертвая зона

What is the Temporal Dead Zone?

This is what the TDZ is: the term to describe the state where variables are 
un-reachable. They are in scope, but they aren't declared.

The let and const variables exist in the TDZ from the start of their enclosing 
scope until they are declared.

You could also say that the variables exist in the TDZ from the place they get 
bound (when the variable gets bound to the scope it's inside) until it is 
declared (when a name is reserved in memory for that variable).
Shrey A

Ответы похожие на “Что такое временная мертвая зона”

Вопросы похожие на “Что такое временная мертвая зона”

Больше похожих ответов на “Что такое временная мертвая зона” по JavaScript

Смотреть популярные ответы по языку

Смотреть другие языки программирования