I have read the mega-thread on JavaScript closures, and there seems to be some discrepancy between the answers I have found, and was hoping I could get some further clarification.
Some of the answers within the thread states a closure is created when an inner function references variables from an outer function.
I found another answer that stated that this was a closure:
var a = 42;
function b() { return a; }
Notice how there is no inner/outer function, but simply just one function. The explanation that person gave was that a closure is when a function references an outer scope.
So my question is that is a closure created only when there are two functions (inner and outer), or when a function references an outer scope, which may or may not be a function (in this case, it simply is the top-level scope)?