SoFunction
Updated on 2025-03-01

Javascript method to determine whether there is a function


=function(){
try{

if(test&&typeof(test)=="function"){
test();
}else{
alert("non-existent function");
}
}catch(e){
}
}
function test(){
alert("function execution...");
}