In the example given below, we add a
second line in the same
canvas, after we added our first line.
The second line starts
from a location which is different from
the start and end of the first line. This
creates two different lines on the
canvas.
To achieve this, notice that we
added a moveTo()
method after we
created the first line. This moved
the starting location of the next
line to a separate location. Then, we
added a new line using the lineTo()
method.