js canvas line end code example Example: js canvas line end ctx.lineCap = "butt" || "round" || "square";