var obj = {}; var fn = function(){}; obj.prop = \"some value\"; fn.prop = \"some value\"; assert( obj.prop == fn.prop, \"Both are objects, both have the property.\" ); a
Functions are objects, but they are a particular type of object. typeof(fn) should evaluate to "function", which is a sub-type of "object".
typeof(fn)