Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if it is a function javascript

// Detecting whether it is a function In fact, it is good to write isFunction directly after writing, so as to avoid repeated writing judgments
const isFunction = (obj) => {
   return (
      typeof obj === 'function' &&
      typeof obj.nodeType !== 'number' &&
      typeof obj.item !== 'function'
   );
};
 
PREVIOUS NEXT
Tagged: #check #function #javascript
ADD COMMENT
Topic
Name
6+3 =