Something like this, but not using __proto__:
var o = { i :2 }; var f1 = function(){ alert(f1.i); } f1.__proto__ = o; o.i = 3; f1(); //3 This question have not an answer here: How to set the prototype of a JavaScript object that has already been instantiated?
__proto__"? What are you trying to do here in the first place, what is your use case?