How to access object prototype in javascript?
var f = function(); var instance = new f(); If you know name of instance class function, you can simply access prototype as: var prototype = f.prototype; prototype.someMember = someValue; If you don’t: 1) var prototype = Object.getPrototypeOf(instance); prototype.someMember = someValue; 2) or var prototype = instance.__proto__; prototype.someMember = someValue; 3) or var prototype = … Read more