title: How can I use setInterval and clearInterval?
body: <p>Consider:</p>
  <pre><code>function doKeyDown(event) {
      switch (event.keyCode) {
      case 32:
          /* Space bar was pressed */
          if (x == 4) {
              setInterval(drawAll, 20);
          }
          else {
              setInterval(drawAll, 20);
              x += dx;
          }
          break;
      }
  }
  </code></pre>
  <p>I want to call <strong><code>drawAll()</code> once</strong>, not creating a <strong>loop</strong> that call <code>drawAll</code> again and again. Should I use a recursive method for that or should I use <strong><code>clearInterval</code></strong>?</p>
  <p>How can I use <code>clearInterval</code>?</p>