How Prototypal Inheritance works in JavaScript