Where Variables Live
Where Variables Live: Scope: Local and Global Variables.
Updated
- Scope: Local and Global Variables (Apprentice): A variable made inside a function is local and disappears when the call ends, a variable made outside every function is global and can be read anywhere, and a function that takes values in and hands its result back is easier to trust than one that changes a global.