const sort = 'other';
const any = 'other';
const obj = {
sort: 'my name is sort',
other: 'my name is other',
test() {
console.log(this.sort); // 'my name is sort'
console.log(this[sort]); // 'my name is other'
console.log(this[any]); // 'my name is other'
}
}
obj.test();