Testing some OOP kind-of inheritance on JavaScript