Загадка javascript: 2 объекта, которые кажутся идентичными относительно конструктора, прототипа и ссылки __proto__, ведут себя по-разному

Я опытный объектно-ориентированный программист, но это меня достало! Почему я могу сделать новый f (), но не новый a (). Я буду признателен за любые указатели.

 // first a few facts 
if (Object instanceof Function) console.log("Object isa Function");
console.log("Function.prototype is " + Function.prototype);
/* output
 Object isa Function
  Function.prototype is function Empty() {}
*/

var f = new Function();
console.log("Prototype of f:" + f.prototype);
console.log("Constructor of f:" + f.constructor);
console.log("Prototype Link of f:" + f.__proto__);
if (f instanceof Function) console.log("f isa Function");
/* output
Prototype of f:[object Object]
Constructor of f:function Function() { [native code] }
Prototype Link of f:function Empty() {}
 f isa Function
*/


function A() {}
console.log("Prototype of A:" + A.prototype);
console.log("Constructor of A:" + A.constructor);
console.log("Prototype Link of A:" + A.__proto__);
if (A instanceof Function) console.log("A isa Function");
/*
Prototype of A:[object Object]
Constructor of A:function Function() { [native code] }
Prototype Link of A:function Empty() {}
A isa Function
*/

 // contruct a
var a = new A();
console.log("Prototype of a:" + a.prototype);
console.log("Constructor of a:" + a.constructor);
console.log("Prototype Link of a:" + a.__proto__);
if (a instanceof Function) console.log("a isa Function");
if (a instanceof A) console.log("a isa A");
/* output
 Prototype of a:undefined
Constructor of a:function A(){}
Prototype Link of a:[object Object]
a isa A
*/

console.log("~~~~~b constructed as new f()");
var b = new f();
console.log("Prototype of b:" + b.prototype);
console.log("Constructor of b:" + b.constructor);
console.log("Prototype Link of b:" + b.__proto__);
/* output
 ~~~~~b constructed as new f()
Prototype of b:undefined
Constructor of b:function anonymous() {}
Prototype Link of b:[object Object]
*/

console.log("~~~~~b constructed as new a()");
a.prototype = Object.prototype;
a.constructor = Function;
a.__proto__ = Function.prototype;
if (a instanceof Function) console.log("a isa Function");
console.log("Prototype of a:" + a.prototype);
console.log("Constructor of a:" + a.constructor);
console.log("Prototype Link of a:" + a.__proto__);
/* output
~~~~~b constructed as new a()
a isa Function
Prototype of a:[object Object]
Constructor of a:function Function() { [native code] }
Prototype Link of a:function Empty() {}     
*/
b = new a();
/* ERROR  Uncaught TypeError: object is not a function*/

Я сделал все возможное, чтобы обеспечить вывод, а также. обратите внимание, что f и a идентичны с точки зрения прототипа, конструктора и ссылки на прототип. Почему появляется ОШИБКА, когда я пытаюсь создать новую () в последней строке?

Ответы на вопрос(1)

Ваш ответ на вопрос