---
title: "Discussion on \"What Is a Closure? How a Function Remembers Where It Came From\" | Hashnode"
description: "Discussion on \"What Is a Closure? How a Function Remembers Where It Came From\". To put it simply, a closure is a function that remembers the variables around it at the moment it was created, even after the code that created it has finished running. I learned this in a file I call"
url: "https://hashnode.com/posts/what-is-a-closure-how-a-function-remembers-where-it-came-from/6b04e858ad344369c9af93c4"
---

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

Discussion

# [What Is a Closure? How a Function Remembers Where It Came From](https://itsmeminsithu.hashnode.dev/what-is-a-closure-how-a-function-remembers-where-it-came-from?utm_source=hashnode&utm_medium=feed)

To put it simply, a closure is a function that remembers the variables around it at the moment it was created, even after the code that created it has finished running. I learned this in a file I call

3d ago · 6 min read · itsmeminsithu.hashnode.dev  
Read the article

-   [#closures](https://hashnode.com/tag/closures)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#python](https://hashnode.com/tag/python)
-   [#functions](https://hashnode.com/tag/functions)

## Written by

[Min SiThu](https://hashnode.com/@itsmeminsithu)

@itsmeminsithu · Singapore

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

Software Engineer

Nubbad Developer. | Now I accidentally create problems.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
