JavaScript Graphics

Back to index


ASSIGNMENT:
Your assignment is to recreate the image shown to the left. Although you could create the image using a heck of a lot of calls to lineTo(x,y), you can save a ton of lines of code by using a loop or two. Whenever there's a pattern, there's a way of using iteration to reduce the number of lines of code required to deal with the situation. (This is true whether we're dealing with a visual pattern, a verbal pattern, or any other kind of pattern.)