Please enable JavaScript to use CodeHS

CodeHS Glossary


line(x1, y1, x2, y2) JavaScript

Draws a line (direct path between two points) to the screen. The first two parameters x1, y1 control the position of the first point and the last two parameters x2, y2 control the position of the second point.