In order to comply with federal laws, all vehicles must be equipped with a brake light that illuminates when the brakes are applied by the driver. This is to signal drivers to the rear that your vehicle is slowing down or coming to a stop. To operate the brake light - or rather brake lights, since most vehicles have both a left and right brake light (and even a “third eye” light) - a driver need only step on the brake pedal.
That is because, attached to the brake pedal lever is a small switch, the brake light switch. It is mounted above the pedal under the dashboard. The switch senses the position of the pedal. When you press on the pedal, the pedal arm engages the switch, closing the electrical contacts inside and triggering the lights to come on.
This is demo Question
This is demo Answer