Learning Object and inheritance in ES5