---
title: "Discussion on \"Closures in JavaScript - the Simplest Way\" | Hashnode"
description: "Discussion on \"Closures in JavaScript - the Simplest Way\". Closures in JavaScript are like secret passageways for a function to remember certain variables, even after it's done running. In this article, I'll try to answer the question \"how do JavaScript closures work?\" in the simplest way so you can start us..."
url: "https://hashnode.com/posts/closures-in-javascript-the-simplest-way/63cf1c8b52b9bbbca95dbb5e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Closures in JavaScript - the Simplest Way](https://blog.dotenx.com/closures-in-javascript-the-simplest-way?utm_source=hashnode&utm_medium=feed)

Closures in JavaScript are like secret passageways for a function to remember certain variables, even after it's done running. In this article, I'll try to answer the question "how do JavaScript closures work?" in the simplest way so you can start us...

Jan 23, 2023 · 3 min read · blog.dotenx.com  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#tutorial](https://hashnode.com/tag/tutorial)
-   [#nocode](https://hashnode.com/tag/nocode)

## Written by

[Sam (Mohsen) Kamrani](https://hashnode.com/@MohsenDo10x)

@MohsenDo10x · Sydney, Australia

  
[View profile](https://hashnode.com/@MohsenDo10x)

Founder of 0dev.io

Founder of https://dotenx.com

## Responses 1

Markdown supported · ⌘↵ to post

[Kumar Raj](https://hashnode.com/@arrogantCoder)

[Jan 24, 2023](https://hashnode.com/posts/closures-in-javascript-the-simplest-way/63cf1c8b52b9bbbca95dbb5e/comment/63cf46b9b0e841d4136d9b89)

Whoa man, your explainations and examples are very easy to understand. GJ Sir, eagerly waiting for your future blogs

[Sam (Mohsen) Kamrani](https://hashnode.com/@MohsenDo10x)

[Jan 30, 2023](https://hashnode.com/posts/closures-in-javascript-the-simplest-way/63cf1c8b52b9bbbca95dbb5e/comment/63cf46b9b0e841d4136d9b89#reply-63d76872e7e4ee42376ee623)

I'm glad you find this helpful and thanks for the kind words.
