<html>
<body>
<script language = "javascript">
let methodName = "showName";
class PersonClass {
   constructor(name) {
     this.name = name;
   }
   [methodName]() {
      document.write(this.name);
   }
}
let me = new PersonClass("Ali Ahmadi");
me.showName(); // "Ali Ahmadi"
</script>
</body>
</html>