title: Compare two different arrays in Actionscript 3 using For Loop within a For Loop
body: <p>basically I need a loop within a loop to compare two different arrays in my actionscript3 lottery game.<br>
  I have attempted the loop but I cannot seem to get it to work ...</p>
  
  <pre><code>check_win.addEventListener(MouseEvent.CLICK, f_check_win);
  function f_check_win(event:Event):void{ 
  for(index = 0; index &lt; matches[index]; index++ ){
  trace(index);
      for(index2 = 0; index2 &lt; input_array.length; index2++){
          if (match[index2] == input_array[index2]){
              choose_change = choose_change+1;
          }
      }
  }
  </code></pre>
  
  <p>So basically within this code check_win is a button. Once the button is clicked it runs the loop. It is meant to take an instance of matches which contains 6 properties and loop until index is greater than matches. According to my output this is happening but the second loop doesn't appear to do anything. Any help is greatly appreciated.</p>