A bezier curve is similar to quadratric curve, only difference is that quadratic curve has one control point and a bezier curve has two
control points. Below is the code to draw a bezier curve using canvas.

A bezier curve can be created using the bezierCurveTo() method.
Starting point of the curve is defined by the moveTo() method. The first 2 parameters of the bezierCurveTo() method are
the x and y coordinates of the control point 1 of the curve(A control point is a point which is created by the intersection of two tangential lines drawn across the curve). The third and fourth parameters
of the bezierCurveTo() method are the x and y coordinates of the control point 2 of the curve. The fifth and sixth parameters
of the bezierCurveTo() method are the x and y coordinates of the ending point of the curve.