Drawing a line
Now that we have setup canvas and context, it's time for methods ..before we get into that ,we just have to note that the pixel(coordinate) convention ,as canvas is a '2d' grid ,the upper left corner is (0,0) ==> (x,y).
and as we move to the right x coordinate increases , if we go down y coordinate increases.
For drawing a line we first go to the point where we want to start the line and from that position we draw a line to the end point.So we need two points.
We do that using different methods( )
- beginPath( ) - declareswhere we are about to draw the new path
- moveTo( ) - it positions the context point
- lineTo( ) - it draws a straight line from starting point to ending point
- stroke( ) - to fill the outline of the path.(by default stroke =0 )

