This shows that if there are two global variables named the same, the second one will overwrite the first.
This shows that if there are two local variables named the same, they do not interfere with each other.
This shows what happens when you have local and global variables. At this point they do not interfere with each other because the local variables are declared locally and are being returned to the function and printed out that way.
But if we remove a locally declared variable of the same name as the global variable, the global variable is overwritten by the return statement in the first function.
Another way to declare a variable locally is to put it between the parenthesis of the function and eliminate the var statement within the function brackets.