JavaScript Tutorials - Herong's Tutorial Examples - Version 2.21, by Dr. Herong Yang
Functions Are Objects of the "Function" Type
This section provides an overview of a unique feature of JavaScript language: functions are objects of the 'Function' type.
One very interesting feature the JavaScript language is that a function is an object of the Function object type. Treating functions as objects can lead to several programming implications:
A function can be created in 3 different ways:
Table of Contents
ECMAScript Language Specification and JavaScript Dialects
Data Types, Variables and Expressions
Creating, Accessing, and Manipulating Arrays
Defining and Calling Functions
Web Browser Supporting JavaScript
Server-Side and Client-Side Web Scripting
Defining Your Own Object Types
Inheritance of Properties and Methods through the Prototype Object Chain
'jrunscript' - JavaScript Shell Command from JDK
►Using Functions as "Function" Objects
►Functions Are Objects of the "Function" Type
Using the Function Constructor
Function Object Inherited Properties and Methods
Function Object Instance Properties
Creating Function Objects with "function" Statements
Creating Function Objects with the "function" Operator
Comparing 3 Ways of Creating Functions
Introduction to Built-in Object Types