---
title: "Nirmal Shah (@saveaspng) | Hashnode"
description: "Nirmal Shah (@saveaspng) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@saveaspng"
---

@saveaspng

# Nirmal Shah

@saveaspng · Joined August 2022

## Comments

[Got it, thank you! Ayesha Sahar](https://hashnode.com/posts/simplifying-closures-in-javascript/62e7d4fe053e6bd57842a3a6/comment/62f86e55fffdab933bde90a9#reply-62f8ecc7fffdab933bdea08f)

Reply · Article · Aug 14, 2022 · [Simplifying Closures in JavaScript](https://hashnode.com/posts/simplifying-closures-in-javascript/62e7d4fe053e6bd57842a3a6)

[And it won't even execute the inner block those three times just because "j" is a var? Ayesha Sahar](https://hashnode.com/posts/simplifying-closures-in-javascript/62e7d4fe053e6bd57842a3a6/comment/62f86e55fffdab933bde90a9#reply-62f8e62e69fa1793160c565f)

Reply · Article · Aug 14, 2022 · [Simplifying Closures in JavaScript](https://hashnode.com/posts/simplifying-closures-in-javascript/62e7d4fe053e6bd57842a3a6)

[What I fail to understand is, even if the console is a closure of setTimeout, how does the value of j become 4 if the condition we set in the for loop is that j <=3?](https://hashnode.com/posts/simplifying-closures-in-javascript/62e7d4fe053e6bd57842a3a6/comment/62f86e55fffdab933bde90a9)

Comment · Article · Aug 14, 2022 · [Simplifying Closures in JavaScript](https://hashnode.com/posts/simplifying-closures-in-javascript/62e7d4fe053e6bd57842a3a6)
