先看一段代码:
Function instanceof Object; //true Object instanceof Function; //true
Function和Object互为各自的实例
function Foo(){}; var foo = new Foo(); foo instanceof Foo; //true foo instanceof Object; //true foo instanceof Function; //false Foo instanceof Function; //true Foo instanceof Object; //true
扩展阅读:
http://www.planabc.net/2010/05/06/interesting_code_associated_with_function_and_object/
http://www.mollypages.org/misc/js.mp