---
title: "Discussion on \"Unraveling the Magic of Closures in JavaScript\" | Hashnode"
description: "Discussion on \"Unraveling the Magic of Closures in JavaScript\". In the world of JavaScript, each time we run a function, it creates a fresh local memory (new execution context). It doesn't hold onto memories of previous runs. Once the function finishes executing, its local memory is wiped clean, leaving only the ..."
url: "https://hashnode.com/posts/unraveling-the-magic-of-closures-in-javascript/65034705e670ae6fa7b82fe3"
---

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

Discussion

# [Unraveling the Magic of Closures in JavaScript](https://samyscode.hashnode.dev/unraveling-the-magic-of-closures-in-javascript?utm_source=hashnode&utm_medium=feed)

In the world of JavaScript, each time we run a function, it creates a fresh local memory (new execution context). It doesn't hold onto memories of previous runs. Once the function finishes executing, its local memory is wiped clean, leaving only the ...

Sep 14, 2023 · 2 min read · samyscode.hashnode.dev  
Updated Sep 18, 2023  
Read the article

-   [#showdev](https://hashnode.com/tag/showdev)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#closure](https://hashnode.com/tag/closure)

## Written by

[mahi samia](https://hashnode.com/@samyscode)

@samyscode

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

Backend developer with passion for the Frontend world, Follow me on Instagram for more! (@samyscode))

hey there 👋 i'm Samia, a Backend developer turning to frontend world. i used to work as a Laravel and PHP developer for 3 and half years, in that journey, i had to deal from time to time with some frontend tasks, like fixing responsiveness or converting some psd files into HTML &amp; CSS, that was when i fall in love with it. I loved the idea of turning creative and beautiful design into reality, so i made that career switch and now turning fully to Frontend development. Feel free to checkout my journey on Instagram or just pass Hi

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
