title: How to push values in array using each()
body: <p>I want to have a simple logic -
  each loop runs for input radio and geting two value ie value of radio btton and name of radio button
  Now the alert window only show result of last element 
  I want all the array result should be stored in mf
  Name is comming dynamically </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$("input[type=radio]:checked").each(function() {
    var1 = $(this).val();
    var2 = $(this).attr("name");
    mf = [var2 + "_" + var1];
  });
  alert(mf);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;input type="radio" name="r_1q_1" value="1" /&gt;A
  &lt;input type="radio" name="r_1q_1" value="1" /&gt;B
  &lt;input type="radio" name="r_1q_1" value="1" /&gt;B
  &lt;input type="radio" name="r_1q_1" value="1" /&gt;C</code></pre>
  </div>
  </div>
  </p>