Extend Segment to Line Connect Lines/Wires

The Connect Lines/Wires Tool Options palette.
TOP_Extend Seg
Connecting lines with Close Line
Sequence (a) off and (b) on.

This tool connects the ends of one or more lines by generating a segment from the last point of the line picked first to the first point of the line picked second, and so on. To apply it, either prepick the lines you wish connected and then with the Connect Lines tool click anywhere in the graphic window. Alternatively, you can pick the lines you wish connected as a set using the Connect Lines tool directly. If you select Close Line Sequence from its Tool Options palette, then the last line will also be connected to the first producing a closed shape.