I've heard that accessing let
and const
values before they are initialized can cause a ReferenceError
because of something called the temporal dead zone.
What is the temporal dead zone, how does it relate to scope and hoisting, and in what situations is it encountered?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…