Draw a line

ctx.beginPath();

ctx.moveTo(, );

ctx.lineTo(, );

ctx.stroke();

To draw a line from (000, 000) to (000, 000), start a new path.

Then start a new subpath with a point at (000, 000).

Then add a second point to the subpath at (000, 000), connecting (000, 000) to (000, 000) with a straight line.

Finally, draw the path on the <canvas> by stroking it using the current stroke and line styles.