Next page | Contents page |

Exercise 4 - click and draw

You should now have enough information to change your run() function to add a click event listener. Then write the listener function so that every time you click on the canvas you will draw a either a small square or a circle (you choose which) around the clicked point.

Next page | Contents page |