mySpecialObject.foo = 9; var f = function() { console.log(foo); }; f(); // This should print "9" to console