যখন জাভাস্ক্রিপ্ট ফাংশনের নাম স্ট্রিং হিসেবে থাকে, তখন আপনি ক্লাস মেথডها নাম দিয়ে অ্যাক্সেস করতে পারেন
উদাহরণ
Live Demo
<html> <body> <script> class Demo { methodOne(){ document.write("50"); } methodTwo(){ this['methodOne'](); document.write("<br> 100"); } } let num = new Demo(); num['methodTwo'](); </script> </body> </html>