title: How can I put images in a var memory_array memory game?
body: <p>I'm making a memory game in Javascript but I want to put images in my code instead of numbers or letters.</p>
  
  <p>This is my code:</p>
  
  <pre><code>var memory_array =  [0,'0','1','1','2','2','3','3','4','4','5','5'];
  </code></pre>
  
  <p>How can I change this to images? </p>
  
  <p>I tried this options like:</p>
  
  <pre><code>var imgArray = new Array();
  
  imgArray[0] = new Image();
  imgArray[0].src = 'imgArray/img/parra.jpg'
  
  imgArray[1] = new Image();
  imgArray[1].src = 'imgArray/img/adidas.jpg';
  </code></pre>
  
  <p>But so far, nothing works. 
  I'm stuck can someone help me out?</p>
  
  <p>Thanks.</p>