1let start = {x: 100, y: 100};
2let controlPoint1 = {x: 100, y: 200};
3let controlPoint2 = {x: 200, y: 200};
4let endPoint = {x: 200, y: 100};
5
6ctx.moveTo(start.x, start.y); //Move to start point
7ctx.bezierCurveTo(
8 controlPoint1.x, controlPoint1.y,
9 controlPoint2.x, controlPoint2.y,
10 endPoint.x, endPoint.y
11); //Draw curve
12ctx.stroke(); //Draw outline