how to check if a function has a parameter 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]';
}