Periksa apakah fungsi javascript
variableToCheck instanceof Function
Greenhorizon75
variableToCheck instanceof Function
function isFunction(functionToCheck) {
return functionToCheck && {}.toString.call(functionToCheck) === '[object Function]';
}
if (typeof v === 'function') {
// do something
}