JSFiddle - React, Tailwind, and code Playground
JavaScript
var obj = {
t3: 3,
t1: Object.defineProperties({}, {
getT3: {
value: function () {
console.log(this.t3);
}
},
t2: {
value: this.t3
},
t3: {
value: 4
}
})
}
console.log(obj.t1.t2);
obj.t1.getT3();