A local variable is a variable that is declared within a function.
A global variable is a variable that is declared outside of the funtion but in the script element.
It appears as 'null', since, as far as the computer is concerned, the variable doesn't exist.