let showX; let x = 1; let obj1 = { x: 2, yyy: function() { showX = () => { return this.x; } } }; obj1.yyy(); let obj2 = { x: 3, z: showX }; console.log (obj2.z());
this
obj1.yyy()
obj1