title: What does while(i--) mean in javascript?
body: <p>I'm using swipejs from <a href="http://swipejs.com" rel="noreferrer">swipejs.com</a>, the home page slider uses this logic to highlight the active un-ordered list element and I'd like to know how this <b>while condition</b> works.</p>
  
  <pre><code>&lt;ul id="bullets"&gt;
     &lt;li&gt;&lt;/li&gt;
      ....
  &lt;/ul&gt;
  
  var bullets = document.getElementById('bullets').getElementsByTagName('li');
  
  var elem = document.getElementById('mySwipe');
  
  window.mySwipe = Swipe(elem, {
  
  callback: function(index, element) {
      var i = bullets.length;
      while (i--) {
        bullets[i].className = ' ';
      }
      bullets[index].className = 'on';
    }
  
  });
  </code></pre>