How to execute a function when its name as a string in JavaScript ?
To execute a function when its name is a string in JavaScript, we have multiple approaches. In this article, we are going to learn how to execute a function when its name is a string in JavaScript. Example: function myFunction() { ...}const functionName ="myFunction";Below are the approaches used to