I can understand another_stooge.name return javascript because of the prototype and also understand the return new f() create a brand new object and didn't understand how prototype share details just by inside the "f.prototype = stooge" function.?
if (typeof Object.beget !== 'funcion') {
Object.beget = function() {
var f = function() {};
f.prototype = stooge;
return new f();
}
}
var stooge = {}; // empty object;
var new_stooge = {}; // empty object;
new_stooge.title = "My first title";
new_stooge.color = "white";
var another_stooge = Object.beget(stooge);
stooge.name = 'Javscript';
console.log(another_stooge.name); // Return Javscript ?.