When the Function constructor is called as a function, it creates and initializes a new function object. The function call Function() is equivalent to the expression new Function() with the same arguments.
The arguments supplied to the Function() constructor are all assumed to be parameters apart from the last one which is taken to be the body Source Script Text. If there is only one argument, then that is taken to be the body of the function.
ECMA 262 edition 2 - section - 15.1.3.2
ECMA 262 edition 2 - section - 15.3.1
ECMA 262 edition 2 - section - 15.3.2.1
ECMA 262 edition 2 - section - 15.3.4.1
ECMA 262 edition 3 - section - 15.3.1
Prev | Home | Next |
Function() | Up | Function.apply() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |