---
title: "Discussion on \"Explanation of JavaScript Closures\" | Hashnode"
description: "Discussion on \"Explanation of JavaScript Closures\". What are closures?\nA closure is a combination of a function bundled together with relations to its surrounding state (the lexical environment).\nIn simple words, every function in Javascript has access to its outer lexical environment (variables, func..."
url: "https://hashnode.com/posts/explanation-of-javascript-closures/61f2bbd922a38747671d67fb"
---

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

Discussion

# [Explanation of JavaScript Closures](https://saharanitaa.hashnode.dev/explanation-of-javascript-closures?utm_source=hashnode&utm_medium=feed)

What are closures? A closure is a combination of a function bundled together with relations to its surrounding state (the lexical environment). In simple words, every function in Javascript has access to its outer lexical environment (variables, func...

Jan 27, 2022 · 2 min read · saharanitaa.hashnode.dev  
Updated Jul 11, 2024  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#closure](https://hashnode.com/tag/closure)
-   [#software-development](https://hashnode.com/tag/software-development)

## Written by

[Ranita Saha](https://hashnode.com/@sunshine659)

@sunshine659 · Bangalore

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

Learning, Living, Loving every bit of this glorious life ❤

☆ Learning, Living, and Loving every bit of this glorious life❤ ☆ Frontend Engineer ☆ On a journey to make a difference💫

## Responses 1

Markdown supported · ⌘↵ to post

[Benjamin Nwokolo](https://hashnode.com/@benjamin68)

[Sep 7, 2022](https://hashnode.com/posts/explanation-of-javascript-closures/61f2bbd922a38747671d67fb/comment/63186d915abe8613b3d2d75a)

well explained !!
