title: Inheritance and polymorphism using arrow functions in JavaScript Classes
body: <p>Why do arrow functions take precedence over function declarations in JavaScript Classes?</p>
  
  <p>Example : </p>
  
  <pre><code>
  class Parent {
  
      work = () =&gt; {
          console.log('This is work() on the Parent class');
      }
  }
  
  class Child extends Parent {
  
      work() {
          console.log("This is work() on the Child class ");
      }
  
  }
  
  const kid = new Child();
  
  kid.work();
  </code></pre>
  
  <p>The parent work() method fires in this example : </p>
  
  <p><strong>"This is work() on the Parent class"</strong></p>
  
  <p>I just want to understand <strong>WHY</strong> the arrow function always takes precedence in JS Classes, especially in regards to Inheritance and Polymorphism.</p>