javascript how to tell if a function exists code example
Example: js check if function exists
if (typeof yourFunctionName == 'function') {
yourFunctionName();
}
if (typeof yourFunctionName == 'function') {
yourFunctionName();
}