someF creates a new (local area) variable called someGlobal (which masks the global someGlobal ) and assigns a value to it. It does not concern the global someGlobal (although it cannot access it because there is another variable with the same name in the area).
Operators
var raised, so someGlobal masked for all someF (not just after the var statement). The value of the local someGlobal is undefined until it is assigned a value.
someF2 access the original (untouched) global someGlobal .
source share