If you want to check if a function exists or not before calling, here’s how to do it
if(typeof window.functionName == 'function') {
functionName (arg1, arg2);
}
It returns a boolean value indicating if the function exists or not.
If you want to check if a function exists or not before calling, here’s how to do it
if(typeof window.functionName == 'function') {
functionName (arg1, arg2);
}
It returns a boolean value indicating if the function exists or not.