JS: Function Object

By Xah Lee. Date: . Last updated: .

Function is the value of the property key "Function" of the global object. [JS: the Global Object]

console.log( window.Function === Function ); // true


Function is a function.

[see JS: Value Types]

console.log ( typeof Function === "function" ); // true


Parent of Function is Function.prototype. [see JS: Prototype and Inheritance]

console.log ( Reflect.getPrototypeOf ( Function ) === Function.prototype ); // true


Purpose of Function is:

  1. To define a function from strings. (Useful when you need to generate function definition at run time).
  2. Holds the property key "prototype". The value of Function.prototype is the parent object of all function objects.

Function Constructor

JS: Function Constructor



This is a data property. Its value is 1. This property has the attributes { writable: false, "enumerable": false, configurable: true }.

[see JS: Property Attributes, writable, enumerable, configurable]

JS Function

  1. Define Function
  2. Arrow Function ⭐
  3. Function Params
  4. “arguments” Object
  5. Rest Params ⭐
  6. Arg Default Value ⭐
  7. Arg Destructure ⭐
  8. f Declaration vs Expression
  9. Closure
  10. f call apply bind
  11. Functional Programing

Like it? Help me by telling your friends. Or, Put $5 at patreon.

Or, Buy JavaScript in Depth

If you have a question, put $5 at patreon and message me.

Web Dev Tutorials