Possible Duplicate:
Function Arguments Passing and Return
I need a little help with this
var foo = {
bar: function () {
return this.baz;
},
baz: 1
};
(function () {
return typeof arguments[0]();
})(foo.bar);
This snippet when executed returns 'undefined' Can someone please explain why is this so ?