This is a private variable within the scope. it is "invisible" to the global scale.
As for your code, it is better to write like this:
foo = function(a){ if (typeof a == "undefined") a = "Some value";
Because !a may be true for 0 , an empty string, '' or just null .
source share