Web draw a line your browser does not support the canvas element example
How to draw a line in javascript canvas. Use the stroke () or fill () method to draw the path. The moveto () defines the starting point of the line. The methods the beginpath () method starts a new path.
It does not draw anything, it just sets a start point. Web description the lineto () method adds a line from the last point in the path to a new point.