Watch a demo of different values of the lineTo() method.
Or click a specific value to see the result:
const c = document.getElementById('myCanvas'); const ctx = c.getContext('2d'); ctx.beginPath(); ctx.moveTo(20,20); ctx.lineTo(100,100); ctx.stroke();