When learning angularjs I found out that if you put objects in a prototype object , the instances that inherit from that prototype would change the prototype's objects on assigning.
Example :
function Person(name) {this.name = name;}
Person.prototype = {species : "homo-sapiens" , characteristics : { "legs" : 2 , "height" : 175}}
var joe = new Person("joe");
joe.characteristics.legs = 1 ;
console.log(Person.prototype.characteristics) //Object {legs: 1, height: 175}
What I showed is that the prototype's instance (joe) changed the object's value on the prototype itself because it inherited an object (characteristics) and not a primitive.
My question is as follows : Are prototypes meant most of the time to hold primitives? (in most cases , you would never want an instance to change the prototype's value. Angular.js actually does so , but it's in the rare case where you actually want a child instance to write to the prototype) . And what would you do if you actually wanted to put an object on the prototype without the instances writing to the prototype on assigning?