function drawTriangle(left, top, right, color) {
drawLine(left, top, color);
drawLine(left, right, color);
drawLine(top, right, color);
}
drawTriangle({ x: 0, y: 0 }, { x: 3, y: 3 }, { x: 6, y: 0 }, "blue" );
drawTriangle({ x: 6, y: 6 }, { x: 10, y: 10 }, { x: 6, y: 16 }, "purple");
Maybe it's a case of getting used to it, but with my version I can very quickly ignore parts of code, which are not relevant to the thing I'm looking for.
and they will gradually get complicated tasks
actually sounds like a trainee