Testing if something is a class in javascript
<p>Hey all, I am trying to test if the argument passed into my function is a class name so that I may compare it to other classes using instanceof.</p>

<p>For example:</p>

<pre><code>function foo(class1, class2) {
  // Test to see if the parameter is a class.
  if(class1 is a class)
  {
    //do some kind of class comparison.
    if(class2 is a class)
    {
       if(class1 instanceof class2)
       {
          //...
       }
    }
    else
    {
       //...
    }
  }
  else
    //...
}
</code></pre>

<p>Is this possible? I am having trouble googleing an answer. </p>
