What are the benefits of comma's compared to semicolons in jquery?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/694102/declaring-multiple-variables-in-javascript">Declaring Multiple Variables in JavaScript</a>  </p>
</blockquote>



<p>I was setting some variables in jQuery and someone suggested I do it this way:</p>

<pre><code>var $wrapper = that.parents(".wrapper"),
$prettyCheckBox0 = $wrapper.find(".prettyCheckbox small:eq(0)"),
$prettyCheckBox1 = $wrapper.find(".prettyCheckbox small:eq(1)"),
$prettyCheckBox2 = $wrapper.find(".prettyCheckbox small:eq(2)"),
standard = $prettyCheckBox0.parents("span").parents("label").prev("input").val(),
professional = $prettyCheckBox1.parents("span").parents("label").prev("input").val(),
premium = $prettyCheckBox2.parents("span").parents("label").prev("input").val();
</code></pre>

<p>instead of the semicolons and though this works, I was wondering if anyone has a reason on why to pick one over the other and how this works?  It seems like it would cause syntax errors.  Also, why is there one one "var"</p>
