12) Paint the Canvas

Before clicking the link, look at what this code does.
  • Why is there a zero in line 6?
  • Line 14: What is this particular set of colors names called?

Here’s the link to a simple HTML page consisting of the above source code (please give it some time to fully execute because it is painting every pixel in the window):

zapmap.com/programming/javascript/paint-th-canvas.html

(Takes about 9 seconds on my machine.)