check is function javascript code example
Example 1: check if function javascript
variableToCheck instanceof Function
Example 2: isfunction javascript
function isFunction(functionToCheck) {
return functionToCheck && {}.toString.call(functionToCheck) === '[object Function]';
}