May 11 · 3 min read · Imagine you're packing a suitcase. When you close the suitcase, all the items inside remain with it. Even if you take the suitcase to another place, the items are still inside it. Similarly, a closure
Join discussion
Mar 20 · 11 min read · Introduction What the heck are closures? JavaScript is already full of weird and unexpected behaviour. Well, here's one more: Closures. And here's the kicker—most JavaScript developers don't actually
Join discussion
Feb 10 · 5 min read · Every gold mine has a finite life. The ore body that justified its construction will eventually be exhausted, and the operation will close. What happens to the land after that closure defines the mine's ultimate legacy, and it is a legacy that can la...
Join discussionJan 16 · 49 min read · If you're learning JavaScript, you've probably heard the term "closure" at some point. In many developers' experience, just hearing this word can trigger anxiety. In nearly 17 years of programming experience, I've noticed that closures are one of the...
Join discussion
Dec 20, 2025 · 3 min read · Today I want to write about something that confused me when I first learned JavaScript. The topic is scope and closure. I have heard many times that a lot of developers mix these two up. This topic is considered important and people often say it come...
Join discussionOct 27, 2025 · 14 min read · If you've written code in JavaScript, Python, or Rust, you've probably heard the word closure before. The concept has subtle differences in each language, but the core idea is the same: a closure is a function that captures variables from its surroun...
Join discussion
Aug 15, 2025 · 1 min read · Let’s try a simple custom hook that can be used to handle form values. import { useState } from 'react'; const useFormValues = (initialFormValues) => { const [formValues, setFormValues] = useState(initialFormValues); const setFormValueByKey = (...
Join discussion
Aug 5, 2025 · 5 min read · Closures have become an integral part of modern hair styling, especially in the realm of protective styles and human hair extensions. For many individuals seeking a seamless, natural look without compromising their own hair’s health, closures provide...
Join discussionJul 29, 2025 · 3 min read · Ever wondered how functions remember their outer scope to execute? How scopes work in Javascript? In this article, we will look at the core concepts like execution context, lexical environment, scope chaining and closures. These concepts define how J...
Join discussion