title: How to properly define subclass constructors in Javascript (ES6)?
body: <p>I have trouble making a constructor for subclasses in JS. The constructors for classes work fine though!</p>
  
  <pre><code>//defining base class State
  class State {
      constructor(){
          this.someText = "someText";
      }
      start(){
  
       }
  
       update(){
  
      }
  
      exit(){
  
      }
  }
  
  //defining subclass preloadState
  
  class preloadState extends State{
      constructor(){
          this.ball = "red";
      }
  
      start(){
          console.log(this.ball);
      }
  }
  
  var state = new preloadState;
  state.start();
  
  }
  </code></pre>
  
  <p>When running the code, I get the error <code>this.ball</code> is not defined in the preloadState class. Why is that so?</p>