Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Check if something is a function

function something(){
    return "ssss";
}
typeof something

/*typeof something will console.log "function"*/
/*you can check if something is a function then do this by the follow code*/

if (typeof something ==="function")
{
    console.log("something is a function")
}

 
PREVIOUS NEXT
Tagged: #Check #function
ADD COMMENT
Topic
Name
8+8 =