DEV Community

Discussion on: Building Efficient Algorithms Using Memoization and Closures in Javascript

Collapse
 
onixhoque profile image
Onix Hoque • Edited

I finally understand closure thanks to your example!

Closure = function with persistent state (like functor in c++)

Collapse
 
deciduously profile image
Ben Lovy

I remember it because it "closes over" the locals in the enclosing scope.

Collapse
 
karsonkalt profile image
Karson Kalt

That’s great to hear! πŸ€“