JSFiddle - React, Tailwind, and code Playground
JavaScript
function abc() {
}
if (typeof abc != 'undefined' && $.isFunction(abc)) {
alert('abc exists');
} else {
alert('abc does not exist');
}
if (typeof def != 'undefined' && $.isFunction(def)) {
alert('def exists');
} else {
alert('def does not exist');
}