What does this shorthand mean in JavaScript? : <p>In this code, what does 'q--' mean in the while loop?  </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>getTotal: function () {
 
      var q = this.getItemCount(),
          p = 0;
 
      while (q--) {
        p += basket[q].price;
      }
 
      return p;
}</code></pre>
</div>
</div>
</p>

<p>Is this JS shorthand?  Is there an online tool that converts shorthand JavaScript into longhand?  Also, why are vars q and p declared this way instead of defining them this way: </p>

<p>var q = this.getItemCount();
var p = 0;</p>
