To draw a every new path we need to call beginPath() method. Suppose in your canvas you need to draw various path then you need to call beginPath() method to draw each path.
closePath() method close the shape by drawing a straight line or arc from the current point to start. Wee’ll see the use of both method in below examples.
Now there two other methods:
stroke() method is used to draw am outlines shape and where fill() method is used to paint a shape.
You will see the how to draw a path in the form of lines and arcs in next articles.