Method Function.getName
Get the name of a function
-
Syntax
String Function.getName()
Returns the name of the function if on exist; otherwise the string 'anonymous' is returned. - Return value The name of the function if any; otherwise 'anonymous'.
-
Examples
- To get the name of the function
fnc() {} // Assign fnc to a var a = fnc; // Ouput is 'fnc' a.getName();
- To get the name of the function
- Related Function.getArguments Function.getBody
-
Download
Source
Unless otherwise noted all code in the JSLab Standard Library is licensed as GPLv3. See http://www.gnu.org/licenses/gpl.html for the entire license.
