To determine whether a certain JavaScript object is a function or not, use the following code:
var isFunction = function(obj){ return obj.constructor.name == 'Function' ? true : false;};
No comments:
Post a Comment