Leetcode Javascript Class Inheritance Diagram