A collection of questions and answers on JavaScript scope, including var, let, const, global scope, local scope, closures, and more.
@qs_by_qset
Created this 6 months ago
1. What is the scope of a variable declared with the **var** keyword?
2. What are the benefits of using closures?
3. What is the difference between a closure and a function?
4. How do you create a closure?
5. What is the scope of a variable declared with the **const** keyword?
6. What is the purpose of the **with** statement?
7. What is the difference between var, let, and const?
8. What is the scope of a variable declared with the **let** keyword?
9. How do you access a variable that is declared in a parent scope from a child scope?
10. What is the difference between global scope and local scope?