title: jQuery function returning undefined
body: <p>My function here is ever returnig undefined, what is wrong?</p>
  
  <pre><code>    function getTaxType() {
              $('.type').each(function() {
                  if ($(this).data('tax') === 'form1' &amp;&amp; $(this).is(':checked')) {
                      return 'form1';
                  }
                  else if ($(this).data('tax') === 'form2' &amp;&amp; $(this).is(':checked')) {
                      return 'form2';
                  }
                  else if ($(this).data('tax') === 'form3' &amp;&amp; $(this).is(':checked')) {
                      return 'form3';
                  }
              });
    }
  </code></pre>