The bezierCurveTo() function is used to created cubic Bezier curve form one point to another point. It has two control points such as bezierCurveTo(x1,y1,x2,y2,x,y) where x1 and y1 are the initial control points and x2 and y2 are the second control points and x and y are the end points of bezier curve.
var variableName = canvas.getContext(2d);
variableName.bezierCurveTo(x1,y1,x2,y2,x,y);
You can draw any number of bezier curves on canvas.
Open notepad or any other text editor, follow the following points.
save file with name task.html or task.htm and then open it using any browser and see results.