Built-in function (Definition)

Functions that are part of the core JavaScript implementation.


ECMAScript edition - 2

Built-in functions are implemented as Function objects.

Examples of built in functions are parseInt() and Math.exp(). These are functions provided by the Global object and the Math object respectively. They may be referred to as built-in methods in some documentation.

None of the built-in functions implement the internal Construct() method and therefore they cannot be used with the new operator to create another instantiation.

Generally, none of the built-in functions will have a prototype property, but since they cannot be instantiated this should not cause any problems.

Built-in function objects have a length property whose value is an integer. This generally indicates the number of arguments the function expects to be supplied with. Sometimes functions may be supplied with optional arguments. The length value returns the maximum number of arguments that are expected. The length property of a built-in function has the ReadOnly, DontDelete and DontEnum attributes set for it.

Generally, all the other properties of a built-in function have the DontEnum attribute set.

See also:Function object, Native object


ECMA 262 edition 2 - section - 15

ECMA 262 edition 3 - section - 15