title: Does JS ignore children method if there's property with the same name in the parent class?
body: <p>I just faced the weird behaviour that i don't understant. You can run this code yourself and see.</p>
  <pre><code>class Base {
      get = () =&gt; {
          console.log('i am the Base function');
      }
  }
  
  class Child extends Base {
      get () {
          console.log('i am the Child function');
      }
  }
  
  const child = new Child();
  child.get(); // outputs 'i am the Base function'
  </code></pre>
  <p>Is it supposed to be like this? Can you explain me why?
  And the most important question - how to overcome this? All i want is to override 'get' property and still be able to access 'get' from parent class. <strong>I cannot edit Base class</strong>.</p>
  <p>I actually found the solution. I can do something like this:</p>
  <pre><code>class Base {
      get = () =&gt; {
          console.log('i am the Base function');
      }
  }
  
  class Child extends Base {
      constructor() {
          super();
          this.parentGet = this.get;
  
          this.get = () =&gt; {
              console.log('i am the Child function');
              this.parentGet();
          }
      }
  }
  
  const child = new Child();
  child.get(); // outputs 'i am the Child function' and then 'i am the Base function'
  </code></pre>
  <p>But it doesn't seem right to me.</p>