Closure (computer science) says:
In computer science, a closure is a first-class function with free variables that are bound in the lexical environment.
Translation:
Closures close/attach the variables around the function, so that that function can be teleported to somewhere else and still use those variables
e.g. suppose you are teleported to a remote location but have still access to your coffed mug lying on your table
Example:
function makefunc(x)
{
return function(){return x}
}
Now using makefunc, you can make many anonymous functions which will return what you pass to makefunc
So if you want a function which returns 10, use makefunc(10)(), though pretty useless way toget back 10 :)