Classic OOP in JS homework