title: Correctly declare static variables in JavaScript classes
body: <p>In my code, I do the following (very simplified):</p>
  
  <pre><code>class AddOrSelectAddress {
      static body; // &lt;-- Error
  
      static async open() {
          await $.get(basePath + 'Manage/AddOrSelectAddress', null, result =&gt; {
              this.body = document.createElement('div');
              this.body.innerHTML = result;
          });
          // ...
      }
  
      static someOtherMethod() {
          // do something with body
      }
  }
  </code></pre>
  
  <p>My code works fine in Chrome. Firefox, though, complaints an error in the second line of code:</p>
  
  <blockquote>
    <p>SyntaxError: bad method definition</p>
  </blockquote>
  
  <p>I'm relatively new to class-based JavaScript programming. What am I doing wrong here?</p>
  
  <p><a href="https://stackoverflow.com/questions/1535631/static-variables-in-javascript">Static variables in JavaScript</a> doesn't really help me, because it mainly uses old syntax.</p>