Wrong. A closure is the combination of a function and some references to either values or variables, depending on the language.
It's commonly simplified to just a function that has access to it's calling scope, because it effectively behaves that way in javascript and pretty much any other language that has them.
Log in to continue
We're a place where coders share, stay up-to-date and grow their careers.
Wrong. A closure is the combination of a function and some references to either values or variables, depending on the language.
It's commonly simplified to just a function that has access to it's calling scope, because it effectively behaves that way in javascript and pretty much any other language that has them.