---
title: "Discussion on \"Part 2: Where Variables Survive When Functions Return\" | Hashnode"
description: "Discussion on \"Part 2: Where Variables Survive When Functions Return\". Closures don't \"remember\" their parent scope. They're function objects whose [[Environment]] slot points at a record the GC failed to free."
url: "https://hashnode.com/posts/how-javascript-closures-actually-work/6a0e04668b03460221a75db9"
---

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

Discussion

# [Part 2: Where Variables Survive When Functions Return](https://srekaravarshan.hashnode.dev/how-javascript-closures-actually-work?utm_source=hashnode&utm_medium=feed)

Closures don't "remember" their parent scope. They're function objects whose \[\[Environment\]\] slot points at a record the GC failed to free.

May 20 · 25 min read · srekaravarshan.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#closures-in-javascript](https://hashnode.com/tag/closures-in-javascript)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#learning](https://hashnode.com/tag/learning)

## Written by

[Srekaravarshan N K](https://hashnode.com/@srekaravarshan)

@srekaravarshan

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

Frontend Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
