All of them will have their own instances of this method.
If you use prototypes , they will pass this method if you declare it on the prototype object.
So you can do something like
newObj.prototype.add = function(n) { return this.x+n }
And then do not declare add on the object as before.
In V8, there is a thing called hidden classes , which basically means that all instances of newObj will share the hidden class until you "Make changes to the instance, which (as I understand it) will effectively make all newObj share the method, as with prototyping.
altschuler
source share