const x = 5;
const y = 10;
const obj = {
x,
y,
z: x + y,
calculate() {
return this.x * this.y;
},
[x + y]: 'computed'
};
console.log(obj.calculate() + obj[15] + obj.z);
Post #2841
4.15K
CHALLENGE
- ❤ 4
- 👍 1