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." );
assert(typeof(obj) === 'object', "Yes its an object");
assert(typeof(fn) === 'object', "why is this not an object");
我从周围的一些人那里听说函数是对象
,到目前为止我也相信这一点,但是为什么第一个条件通过
而第三个条件失败
呢?
typeof fn
的结果是什么? - user166390