const propertyName = "name";
const myobject = {
  name: "John",
  age: 30
};
alert(myobject[propertyName]);  // "John"