Why does the engine report that the function Empty()
is the prototype of the native Function
function in JavaScript, but that function is itself undefined (from the user's point of view)?
Function.prototype; // function Empty()
Function.__proto__; // function Empty()
Function.constructor; // function Function()
Empty(); // Uncaught ReferenceError: Empty is not defined
Object.prototype; // Object {}
Object.__proto__; // function Empty()
Object.constructor; // function Function()
Number.prototype; // Number {[[PrimitiveValue]]: 0}
Number.__proto__; // function Empty()
Number.constructor; // function Function()
String.prototype; // String {length: 0, [[PrimitiveValue]]: ""}
String.__proto__; // function Empty()
String.constructor; // function Function()
Boolean.prototype; // {[[PrimitiveValue]]: false}
Boolean.__proto__; // function Empty()
Boolean.constructor; // function Function()
Why not point all of those references to Empty()
to null
or some empty object?