---
title: "Comment by Samandar Boymurodov on \"Understanding \"Closures in Loop\" Problem and How it is Solved in ES6\" | Hashnode"
description: "A Great Explanation Yousaf Khan. I read your answer to my question on Linkedin where you shared a link to this article. I found this article very useful. I&#39;"
url: "https://hashnode.com/posts/understanding-closures-in-loops-problem-and-how-it-is-solved-in-es6/5fe76d37999b3f21e3157a8d/comment/609579f051821218caddbe4c"
---

[Discussion](https://hashnode.com/posts/understanding-closures-in-loops-problem-and-how-it-is-solved-in-es6/5fe76d37999b3f21e3157a8d)

Comment [Understanding "Closures in Loop" Problem and How it is Solved in ES6](https://hashnode.com/posts/understanding-closures-in-loops-problem-and-how-it-is-solved-in-es6/5fe76d37999b3f21e3157a8d)

[Samandar Boymurodov](https://hashnode.com/@samandarboymurodov)

[May 7, 2021](https://hashnode.com/posts/understanding-closures-in-loops-problem-and-how-it-is-solved-in-es6/5fe76d37999b3f21e3157a8d/comment/609579f051821218caddbe4c)

## A Great Explanation Yousaf Khan.

I read your answer to my question on **Linkedin** where you shared a link to this article. I found this article very useful.

I've understood that _var_ has a function scope which is available all over the function whereas _let_ has a block scope created unieqely for each iteration.

[Yousaf Khan](https://hashnode.com/@yousaf)

[May 8, 2021](https://hashnode.com/posts/understanding-closures-in-loops-problem-and-how-it-is-solved-in-es6/5fe76d37999b3f21e3157a8d/comment/609579f051821218caddbe4c#reply-609618831ea29f2c341dfa66)

Glad to know that you found this article useful. Thank you for the positive feedback!
