title: Changing parent's class static method from a subclass
body: <p>I need to change a Parent's static method from a subclass.</p>
  
  <p>From <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/static" rel="nofollow noreferrer">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/static</a> I read:</p>
  
  <blockquote>
    <p>Static method calls are made directly on the class and are not
    callable on instances of the class.</p>
  </blockquote>
  
  <p>In the example below, I have a <code>Parent</code> class with a <code>foo()</code> method which calls the <code>bar()</code> method (both static). I would need to change <code>bar</code> from <code>Child</code> subclass so that calling <code>Child.foo()</code> will call the modified bar method and not the original one.</p>
  
  <p>Is there a possibility (maybe something in the Child's <code>constructor</code>)?</p>
  
  <pre><code>class Parent {
  
    static foo() {
      Parent.bar();
    }
  
    static bar() {
      console.log("HERE I AM");
    }
  
  }
  
  class Child extends Parent {
  
    static bar() {
      super.bar(); // maybe not what I want?
      console.log(", FELLAS!");
    }
  }
  
  Parent.foo(); // HERE I AM
  Child.foo(); // HERE I AM, FELLAS! (need this!)
  </code></pre>