Category "let"

What is the temporal dead zone?

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

What is the purpose of the script scope?

When inspecting scopes of a function in the DevTools console I noticed a "script" scope. After a bit of research it seems to be created for let and const variab

Not able to understand the output of this for loop in JS

I have understood why the output of this code should be 3 3 3. for (var i = 0; i < 3; i++) { setTimeout(() => console.log(i), 1); } I am not a