title: How to send an argument with an addEventListener to a function?
body: <p>I'm quite new to coding and I ran into this tiny problem. I want to send an argument with the addEventListener. When I tried to send an argument with the EventListener it ran the function immediately. I know it's because I have the () after the function name. What I tried to do is basically this:</p>
  
  <pre><code>var card1 = document.getElementById('#id1');
  card1.addEventListener('click',choose(1));
  
  function(num){
   var picture = 'pictures/picture1.png';
   document.getElementById(num).src = pic.replace('90x90','225x225');
  </code></pre>
  
  <p>This is all javascript code, and its purpose is to change a picture. The var picture is in reality chosen based on some arrays in my code, but it's just an image.</p>