A line is determined by two points. Each point has X and Y coordinates.
Move the red and blue dots in the example below and notice how the coordinates of the corresponding points change in the code.
If you play with the controls in the "Config" area, you can change the stroke related attributes in the code.
For every change you make in the "Config" area, you will trigger changes in the "Code" area. The changes will be highlighted.
To better understand "stroke-linecap":