I would like to know what is the difference between overriding methods with prototypes and without prototypes. Consider:
Example 1:
In the first method each of the Animal instance will get its own implementation of sleep and eat methods.
Animal
sleep
eat
While in the second model All instances will share the same instance of the sleep and eat methods.
The second model is better since we can share the methods.