JavaScript: Function Object
Function
is the value of the property key "Function"
of the Global Object
.
console.log( window.Function === Function );
Type
Type of Function
is a function.
console.log( typeof Function === "function" );
Parent
Parent of Function
is Function.prototype.
console.log( Reflect.getPrototypeOf ( Function ) === Function.prototype );
Purpose
Purpose of Function
is:
- To define a function from strings. (Useful when you need to generate function definition at run time).
- Holds the property key
"prototype"
. The value ofFunction.prototype
is the parent object of all function objects.