How to check if a function is already defined ?
This is what I use to check if a function is already defined:
if ( typeof(myFunc()) === 'undefined' ) { console.log('myFunc undefined'); } else { console.log('myFunc defined'); }