title: Radio button array and JavaScript function
body: <p>Making a JavaScript game for a school assignment and I'm in need of some help.</p>
  
  <p>I've got a 5x5 grid of radio buttons, a start button and a table with a span inside to display points. Upon clicking the start button, the variable 'playing' becomes <code>true</code> and a random radio is selected. if a player clicks the selected radio, the points variable is <code>+1</code> and another random radio is selected.</p>
  
  <p>So far I've managed to get the random radio select functions to work however I'm not really sure how to go about the rest. Not too sure how to check if a player clicks on the right radio button.</p>
  
  <pre><code>function SelectRadio(){
      var array = document.getElementsByName('radio'); //Selects all the radio buttons.
      var randomNumber=Math.floor(Math.random()*25)+1; // Selects a random number.
      array[randomNumber-1].checked = true; //Selects a random from the array.
  }
  </code></pre>