title: how do I repeat an image in java script using a for loop so that the picture is printed multiple times in the browser
body: <p>so I have a little sailboat with a drawing of the moon and the sun. How would I create a for loop so that the sailboat, moon and the sun all are repeated across the x and y axis's without repeating the same instructions over and over. The code I made doesn't run when I save it and open the file.</p>
  <pre><code>for(var x = 0; x &lt;= 600; x+200) 
                  {
                      for(var y = 0; y &lt;= 600; y+200)
                      {
                              drawWholeBoat(ctx, 200, 300); 
                      }
                  }
  </code></pre>