title: Javascript passing functions as argument
body: <p>this is probably a very beginner question. Anyways</p>
  
  <p>I want to attach a function the window resize event</p>
  
  <p>Below code works and calls my function</p>
  
  <pre><code>window.addEventListener('resize',function(){updateWindowSize();});
  </code></pre>
  
  <p>I somewhere ready that I could also just be passing the name of the function but </p>
  
  <pre><code>window.addEventListener('resize',"updateWindowSize");
  </code></pre>
  
  <p>does not work. Am I missing something?</p>