Newbie: Checking to see if radio button is checked on form initialization. What does this code mean?
<p>I am a javascript novice. I'm trying to build a complex form whilst simultaneously learning JS and JQ... not an easy task. This code works, but I don't know what two lines do, so I thought I'd ask here.</p>

<p>What this code does is loop through an array to see if a radio button checkbox has been checked as yes or no. It runs at initialization when a user revisits the form he/she is filling out. The code is attached to a textfield element which unhides if myRadioButton is yes, stays hidden if no.</p>

<p>I do not know what lines 5 and 6 do (beginning with the second if statement). Would some knowledgable person please be so kind as to transcribe those lines into a couple of sentences, kind of like they do in tutorials? I would really appreciate it!</p>

<pre><code>var rbVal = "";
var rbBtn =  JQuery("[name=\"myRadioButton[]\"]");
for (var i = 0; i &lt; rbBtn.length; i++)
 if (rbBtn[i].checked) {
  if (rbVal != "") rbVal += ",";
   rbVal += rbBtn[i].value;
 }
if( rbVal != "yes" ){
  doSomething;
  } 
 else {
  doSomethingElse;
  }
</code></pre>
