p5.js line() Function
The line() function is an inbuilt function in p5.js which is used to draw a line. In order to change the color of the line stroke() function is used and in order to change the width of the line strokeWeight() function is used. Syntax: line(x1, y1, x2, y2) or line(x1, y1, z1, x2, y2, z2) Parameters: