title: Javascript - Buttons select and unselect
body: <p>I have some buttons below in my HTML:</p>
  
  <pre><code>&lt;p&gt;
  &lt;input class="answerBtns" name="answer" type="button" value="A" /&gt;
  &lt;input class="answerBtns" name="answer" type="button" value="B" /&gt;
  &lt;input class="answerBtns" name="answer" type="button" value="C" /&gt;
  &lt;input class="answerBtns" name="answer" type="button" value="D" /&gt;
  &lt;input class="answerBtns" name="answer" type="button" value="E" /&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>What I want to know if lets say I want the user to select 3 buttons for example, then if the user clicks on a button, it will highlight the button in a color (lets say green) but the user can only have three buttons selected. If an additional button is clicked then that button would not be selected. The additional button can only be selected if the user unselects a selected button and then selects the button he wishes. This means that only 3 buttons can be selected at maximum. </p>
  
  <p>My question is that what functions in Javacsript can be used to be able to do this?</p>
  
  <p>Thank You</p>