title: Storing numerical values from radio button input using jQuery
body: <p>I'm working on an <code>HTML5</code> quiz, where I'm using radio buttons for <code>yes</code> or <code>no</code> questions, and then assigning each radio button a value of <code>0</code> or <code>1</code>, then store the numerical value as a variable, then add all the variables together to score the quiz.</p>
  
  <p><strong>UPDATE!!!</strong></p>
  
  <p>Hey! I made the changes you suggested, but when I call the variable, it still comes up as undefined:</p>
  
  <p>Here is my html:</p>
  
  <pre><code>&lt;form class="answer" id="question_one"&gt;
    &lt;input type="radio" class="styled" name="first_answer" value="1"/&gt;&lt;!-- POSITIVE ANSWER --&gt;
    &lt;div class="answer_text"&gt;Yes&lt;/div&gt;
    &lt;input type="radio" class="styled" name="first_answer" value="0" /&gt;&lt;!-- NEGATIVE ANSWER --&gt;
    &lt;div class="answer_text"&gt;No&lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Here is my JavaScript:</p>
  
  <pre><code>$('#question_one input:radio[name=first_answer]').on('change', function () {
  var first_question = parseInt(
      $("input[name=first_answer]:checked").val()
      );
  </code></pre>
  
  <p>});
  I tried to include a bit more specificity to the jQuery object by only targeting Radio Buttons with name=first_asnwer. Maybe I screwed up?</p>
  
  <hr>