Variable scope is most important when you write functions. Variable scope determines which functions recognize certain variables. If a function recognizes a variable, the variable is visible to that function. Variable scope protects variables in one function from other functions that might overwrite them. If a function doesn't need access to a variable, that function shouldn't be able to see or change the variable. In other words, the variable should not even be ''visible" to that particular function.