title: Call a function whose name is stored in a variable
body: <p>I have the following script:</p>
  
  <pre><code>(function () {
      var Module = (function () {
          var fctToCall = function () {
              alert('Foo');
          };
          return {
              fctToCall: fctToCall
          };
      })();
      var Module2 = (function () {
          var init = function () {
              var str = 'fctToCall';
              Module.str(); // here
          };
          return {
              init: init
          };
      })();
  })();
  </code></pre>
  
  <p>So I want to call this <code>fctToCall</code> method by its name - how can I do that? So far I know 3 methods:</p>
  
  <ul>
  <li>by attaching the function to the window object, but then it wouldn't be local and in closure, and I wouldn't have the access to other local variables</li>
  <li>eval, the best options as far as I see it, but it's still eval, so I don't wanna use it</li>
  <li>this, but it's another architecture, I don't wanna change it</li>
  </ul>
  
  <p>How can I solve this?</p>