title: How to add array to parameter with function?
body: <p>I am very new to programming and I am wondering if anyone can help me with this.</p>
  
  <p>I am trying to make a pop up page. 
  I set variables for each click area which I set each area with <code>div</code> and placed with css. 
  Also for each pop up image which I put div id on each image on html and set <code>display = "none"</code> on css.
  I want to make a function that shows one image on touchend and hide other images at the same time.</p>
  
  <p>Could you help me with my code?</p>
  
  <pre><code>var pop = new Array("pop1","pop2","pop3","pop4","pop5","pop6");    
  var clickArea = new Array("click1","click2","click3","click4","click5","click6");    
  function diplay(click,show,hide){   
      click.addEventListner("touchend",function(){    
         show.style.display = "block";    
         hide.style.display = "none";    
      });    
  };    
  display("click[0]","pop[0]","pop[1,2,3,4,5]");
  </code></pre>