Category "let"

Why does let not allow mutually recursive definitions, whereas letrec can?

I suspect that I fundamentally misunderstand Scheme's evaluation rules. What is it about the way that let and letrec are coded and evaluated that makes letrec a

What's the difference between using "let" and "var"?

ECMAScript 6 introduced the let statement. I've heard that it's described as a local variable, but I'm still not quite sure how it behaves differently than the

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