JS: Function.prototype.name

By Xah Lee. Date: . Last updated: .

every function have a own property string key "name"

Function.prototype is a function, therefore it has a property string key "name".

console.assert(
 typeof Function.prototype === "function",
);
console.assert(
 Object.hasOwn(Function.prototype, "name"),
);

value is a empty string.

console.assert(
 Function.prototype.name === "",
);