Function.create >= 0.1.0
Purpose
Create a function with the given variable as name
Syntax
Function.create
(
Stringname
Functionfnc
);
Parameters
name
- The name of the function
fnc
- The function body
Return values
Function
Examples
var fnc = Function.create('ReturnOne', function() {
return 1;
});
typeof fnc;>>> "function"
fnc.name;>>> "ReturnOne"
fnc();>>> 1
Comments