Menu

1 / 2

Some basic understanding of closure🎈

DEV Community·E_Chronosands::·6 months ago
#k0RBBQE4
Reading 0:00
15s threshold

About closure

Quoting Wikipedia: In computer science, a closure, also known as a lexical closure or function closure, is a technique for implementing lexical binding in programming languages ​​that support first-class functions. In implementation, a closure is a structure that stores a function (usually its entry address) and an associated environment (equivalent to a symbol lookup table).

The above description is very professional. I prefer to describe it this way: the ability of a function to remember and access variables in the scope in which it was defined .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.