var x = 1; function f() { log(x); x = 2; log(x); } f(); log(x);