Anyway, as you can see, drawing a triangle isn’t particularly hard. At least, it should no longer be after seeing how easy it is to draw a few lines and set a few visual properties. It just requires you keeping track of where your virtual pen is at the end of a series of moveTo, lineTo, and closePath commands.

Get hands-on with 1200+ tech skills courses.