It's not much harder using an interesting image instead of a boring rectangle.
In Javascript, images are held in variables. We declare and load the image like so:
You only have to declare and load the image once, then you can draw it as many times as you like:
|