I have a polygon object (say a car) drawn inside a HTML5 canvas with help of methods moveTo and lineTo. I want to repeatedly draw that object at di
moveTo
lineTo
You have to clear the canvas at the start of every draw frame
context.clearRect(0, 0, canvas.width, canvas.height);