title: How to determine if a Javascript class has been declared?
body: <p>I have some javascript that is being referenced via html that is loaded via AJAX (ie: AJAX retrieves HTML, HTML has a <code>&lt;script&gt;</code> tag in it that references this javascript)</p>
  
  <p>This javascript contains class declarations, ex:</p>
  
  <pre><code>class CalculatorClass{
      ...
  }
  </code></pre>
  
  <p>If this script gets loaded twice, I get an error: <code>redeclaration of let CalculatorClass</code>.  Since it's not a variable, I can't test if it's <code>undefined</code> first - and even then it would restrict the scope.  How do I only declare the class if it isn't already?</p>