title: Use prototypal inheritance vs delegation pattern
body: <p>I have two code example which do same thing. 
  But this is interesting me which is best in this use case. I know <strong>prototypal inheritance</strong> actually <strong>behavior delegation pattern</strong>. But you can see in my first example I use to prototype for store helper methods second one when I need helpers I create new instance helper class and use this instance. After used this instance Garbage Collected.
  <br>
  This is interesting for me which is best? <br>
  When I create new instance function call time is this noticeable performance problem?</p>
  
  <pre><code>class UserHelper {
      checkFileSize() {
  
      }
  
      fileUpload() {
  
      }
  
  }
  
  class User extends UserHelper {
      constructor(firstName, lastName) {
          super()
          this.firstName = firstName;
          this.lastName = lastName;
      }
  
      changeUserAvatar() {
          this.checkFileSize();
          this.fileUpload();
      }
  }
  
  const murad = new User();
  </code></pre>
  
  <p>VS</p>
  
  <pre><code>class UserHelper {
  
      checkFileSize() {
  
      }
  
      fileUpload() {
  
      }
  
  }
  
  class User {
      constructor(firstName, lastName) {
          this.firstName = firstName;
          this.lastName = lastName;
      }
  
      changeUserAvatar() {
          const helper = new UserHelper();
          helper.checkFileSize();
          helper.fileUpload();
      }
  }
  
  const murad = new User();
  </code></pre>