I am new to Javascript, so apologies if this has a trivial answer.
According to the ECMAScript language specification, if the return type of a val is Object (implements [[Call]])
then the result is the string "function". What I don't understand is why in the following code, the type of the newly created object is not "function":
function FunctionCreator(){}
FunctionCreator.prototype = Function.prototype;
let obj = new FunctionCreator();
console.log(typeof obj); // object
console.log(obj.call); // ƒ call() { [native code] }
The [[Call]] method is defined in Function.prototype, the same way I believe it is defined for a normal function, and yet typeof returns object.