title: Changing function name with array
body: <p>Could someone say how to make an array of function names that will change in while loop?</p>
  <p>Example of what I want:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var funcNames = ['function1()', 'function2()', 'function3()','function4()','function5()'];
  var i = 0;
   
  while( i &lt; funcNames.length ) {
    function funcNames[i] {
      alert("hello");
    }
   
    i++;
  }</code></pre>
  </div>
  </div>
  </p>
  <p>In the example, the code doesn't work. It only shows how the code should work.</p>