title: Dynamic function names in JavaScript
body: <p>This may seem a bit weird, but can come in handy when creating dynamic event listeners and I'll do my best to explain what I'm trying to achieve. </p>
  
  <p>I have a variable and I want to create a function named after that variable value. Here's en example:</p>
  
  <pre><code>var functionName = "foo";
  // Now I want to create a function named foo. foo is a tring
  
  function [functionName](){
     alert('nothing really');
  }
  
  foo(); //Should alert "nothing really"
  </code></pre>
  
  <p>Thanks!</p>