How to Clear an HTML Canvas

When we've created a canvas, sometimes we'll want to clear it completely before redrawing something else. Let's look at how to do that.

How to Clear HTML Canvas for Redrawing

Let's say we have a canvas, and we've already written code like this: