DEV Community

loading...

Discussion on: Basic JavaScript Interview Questions

Collapse
darkwiiplayer profile image
DarkWiiPlayer

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.