Graphic JavaScript


Back to index
Using SVG there is such a thing as a polyline. Inspect the code for this page to see how the following display is created:

To do this same sort of thing in JavaScript requires a very different approach:
Your browser does not support the HTML5 canvas tag.
Study the two examples until you have a general understanding of how they work. Keep in mind that in the JavaScript example that the doPolyNow function would have worked just as well if it were named "Burt", but that in the SVG example there are no variables that have optional names.
ASSIGNMENT:

Replicate the following pattern as a JavaScript applet: