title: Javascript Finding if Function/Class exists before calling it
body: <p>I know how to check to see if a property of the global context exists. Any variation of</p>
  
  <pre><code>if (typeof myFunction != 'undefined'){...}
  </code></pre>
  
  <p>but what if I don't know the name of the function? I think globally I could do this</p>
  
  <pre><code>if (typeof this['myFunction'] != 'undefined'){...}
  </code></pre>
  
  <p>but I don't know how to do that in a function like this</p>
  
  <pre><code>function load(functionName){
    if (typeof GLOBALCONTEX[functionName] != 'undefined'){
      GLOBALCONTEX[functionName](arg1 , arg2 , ...);
    }
  }
  </code></pre>
  
  <p>And I don't want to use try/catch as I have heard it is slow.</p>