HTML5 Application Development Fundamentals — Question 15
Which JavaScript method is used to draw a circle on a canvas?
Answer options
- A. ellipse
- B. circle
- C. bezierCurveTo
- D. arc
Correct answer: D
Explanation
The correct answer is D, 'arc', which is specifically designed to create circular arcs and circles on the canvas. Options A and B, 'ellipse' and 'circle', do not exist as methods in the canvas API, and option C, 'bezierCurveTo', is used for drawing Bezier curves, not circles.