function G () {
this.x = 1;
this.y = 2;
}
let obj = new G(); // {x: 1, y: 2}
// adding properties to the prototype of G function
G.prototype.y = 3;
G.prototype.z = 4;
console.log(obj)
After inspecting using Chrome's developer tools, the output is shown below:
https://i.sstatic.net/sazFk.jpg
This output has left me puzzled. Can anyone provide an explanation for this result?