Image for post
Image for post
Photo by Joshua Reddekopp on Unsplash

In JavaScript, closure refers to a function “remembering” the variables outside of it.

This behavior is exclusive to returned functions. Let’s have a look:

function whatDay(weekDay) {
return function saveDay() {
console.log(weekDay);
}
}

let today = whatDay("Saturday")

today() // Saturday
  1. whatDay is a function that returns a function saveDay.

Image for post
Image for post
Photo by Alexandra on Unsplash

Often, we don’t say what we think; more often, we don’t write what we believe. The medium is the message.

Sometimes, however, we take the time to think about things, only to find ourselves ensnared by semantics. In the same vein, the minds of many people appear to be possessed, or otherwise entangled, by ideas and thoughts which appear meaningless when we think about them.

We, as a species, are in the habit of inventing artificial constructs, realizations of concepts, to name things, thereby divorcing them from their natural nameless forms. To name something is to guillotine that thing. Our minds have limited capacity, so we must make do with names and labels. …

About

Nikolay Rademacher

writer of fiction and miscellany

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store