I was reading through this thread: http://stackoverflow.com/questions/61088/hidden-features-of-javascript and found this post: http://stackoverflow.com/questions/61088/hidden-features-of-javascript/61260#61260
I was playing around with the code in firebug and I found that this bit of code seems to work fine:
var fn = function(x) {
console.log(this.foo);
}
fn.foo = 1;
How come I can access the property of the function before it's assigned?