Variables modified inside a scope don't modify variables set as undefined in an outer scope