---
title: "Discussion on \"What is Closure in Javascript\" | Hashnode"
description: "Discussion on \"What is Closure in Javascript\". Closure is a powerful mechanism in JavaScript. \nTo understand closure better, it helps to understand how lexical scoping works.\nLexical scoping, in essence, defines the scope of a variable relative to the position it was declared in the code. \nFor ex..."
url: "https://hashnode.com/posts/what-is-closure-in-javascript/602c3112b76f9808b488e5c5"
---

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

Discussion

# [What is Closure in Javascript](https://sebuelias.hashnode.dev/what-is-closure-in-javascript?utm_source=hashnode&utm_medium=feed)

Closure is a powerful mechanism in JavaScript. To understand closure better, it helps to understand how lexical scoping works. Lexical scoping, in essence, defines the scope of a variable relative to the position it was declared in the code. For ex...

Feb 16, 2021 · 4 min read · sebuelias.hashnode.dev  
Updated Mar 6, 2021  
Read the article

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

## Written by

[Sebu Elias](https://hashnode.com/@sebuelias)

@sebuelias

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
