Week 5 — Dealing with Errors
— Drawing with the canvas object
Dealing with errors
Error handling with try-catch-throw
Drawing with the canvas object
You can draw on a page with JavaScript using the Canvas element.
Here are a couple of sites to help you learn about that element.
- The W3 schools HTML5 canvas element description is
here.
- Tutorial
on using cavases.
Here are some examples using the canvas element.
- Draw a line on a canvas here..
- Rectangle moves across the canvas
here.
- An analog clock here.