Update javascript learning about object (OOP)