use obj property inside itself code example
Example: use obj property inside itself
const obj = {
key1: "it ",
key2: () => this.key1 + " works!";
}
alert(obj.key2())
const obj = {
key1: "it ",
key2: () => this.key1 + " works!";
}
alert(obj.key2())