title: How to check if checkbox is checked in Javascript
body: <p>I need to make 5 checkbox which all have a value, going from 1 to 5, I need to print out in a textbox the value when I check one, I can uncheck the boxes and the number disappears.. My problem lies in the uncheck part, I can't seem to find a way to remove the value from the textbox when it's unchecked.. I tried </p>
  
  <pre><code>if( aInput[0].checked == false){
  
      aTxt[0].value = aInput[0].value;
  
  }
  </code></pre>
  
  <p>But it dosen't work</p>