How to Use Function "Constructors"
Constructor
Function()
-
Creates a new
Function
object. Calling the constructor directly can create functions dynamically but suffers from security and similar (but far less significant) performance issues toeval()
. However, unlikeeval()
, theFunction
constructor creates functions that execute in the global scope only.