A quadrilateral is a polygon with four sides and four vertices. The following figure has four sides and four vertices but sides JK and KL are in a straight line. So, can we consider this figure as a quadrilateral? or is it a triangle? but why?
The polygon has three sides and vertices, so it is a triangle. Think about the shape not as having two sides that are in a straight line, but as a normal triangle simply with an extra point labeled on one of the sides.
Consider that if adding an extra point changed the shape, I could make this shape any $n$-gon I want.