Leetcode Javascript Class Extends Value Undefined