class ParentClass {
        constructor(x, y) {}
      }
      class ChilClass extends ParentClass {
        constructor(x, y) {
          super(x, y);
        }
        move(dx, dy) {
          this.x += dx;
          this.y += dy;
        }
      }
      Javascript language logo

      Class Inherit

      My JavaScript recipes

      Class that inherit another class

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.