title: Calling string from array using loop after onclick function [javascript]
body: <p>I would like to display one of arrays after clicking matching array: for example </p>
  
  <ul>
  <li>image 1 after clicking will display array 1 </li>
  <li>image 2 after click will display array 2:</li>
  </ul>
  
  <hr>
  
  <pre><code>var DetailArray = new Array(
              "number 1",
              "number 2",
              "number 3"
          );
  
  function ShowNumber(number) {
   document.getElementById("number").value=  ;
  }
  </code></pre>
  
  <p>img src  image 1 calling function: ShowNumber();</p>
  
  <p>and  paragraph when it would be displayed </p>
  
  <pre><code>&lt;p id="number"&gt;&lt;/p&gt;
  </code></pre>
  
  <p>but I don't really know how to make a loop which will take from arrays matching string.</p>