Checking the content is a function or not

Method Description

Returns true if the obj parameter is a JavaScript Function or AsyncFunction and false otherwise.

Returns

boolean

Supported Script Types

Client and server scripts

Governance

None

//Add additional code
...
function test() {};
var test2 = function() {};

util.isFunction(test);    // returns true
util.isFunction(test2);   // returns true
...
//Add additional code

Leave a comment

Your email address will not be published. Required fields are marked *