Which of the following methods must empty the list of subpaths so that the context once again has zero subpaths?
A
closePath()
B
beginPath()
C
moveTo(x, y)
D
endPath()
Correct Answer: beginPath()
ClosePath() creates a path that starts from current point up to the starting point. The beginPath() method begins a path, or resets the current path. MoveTo(x, y) moves the point specified in canvas but without creating the line. There is nothing like endPath() in canvas.