Actually, I know that scope and closure are related, but I am not clear exactly how or in what sense.
From what I understand scope refers to the visibility of variables (for example inside a function).
And a closure defines the boundary of this visibility.
Is this correct? If so, there is a global scope, but is there also a global closure?
Could someone shed some light and post the simplest possible code demonstrating these concepts?
Christopher Ronny, Oct 22, 2013