title: Animate Canvas using for loop and setInterval
body: <p>I'm trying to animate canvas using for loop and setInterval, but no luck so far... Here's what I have in my code:</p>
  
  <pre><code>//loop function
  function loop(){
      var dynamic = 0;
      var v = 10;
      var x, y;
  
      for (dynamic = 0; dynamic &lt; v; dynamic++) {
          x = dynamic * 1;
          y = dynamic * 1;
          c.clearRect(0, 0, 350, 350);
          c.fillStyle = '#87CEEB';
          c.beginPath();
          c.arc(x, y, 10, 0, Math.PI*2, false);
          c.fill();
      }
  }
  
  setInterval(loop, 20);
  </code></pre>
  
  <p>Thanks so much in advance!</p>