How to understand the expression?

How to implement/define a structure: obj.function[x](y)
It is the Object calling the property function and then I'm confused
June 14th 19 at 20:45
1 answer
June 14th 19 at 20:47
const x = "prop";
const obj = {
 function: {
 prop() {
console.log("Hello");
}
}
}
obj.function[x]();

Find more questions by tags JavaScript