title: call or access a local function by name
body: <pre><code>function f1 () {
      console.log('f1')
  }
  
  var s = 'f1'
  
  runLocalFunctionByName(s)
  </code></pre>
  
  <p>Is this possible at all to write <code>runLocalFunctionByName()</code> or just call <code>f1</code> without typing <code>f1</code> in the source code, but using a variable holding its name? I mean without modifying <code>f1</code> into a method, that answer is obvious: just make <code>myobj.f1 = function</code> or declare it globally like <code>f1= function()</code>. I am talking about normal local functions declared with <code>function</code> keyword only, not as vars, global vars or some other object property.</p>