Hybrid and EV cars generate electricity as you drive them to extend the life of the battery as you drive. One of the ways they do this is through regenerative braking, a process that generates electricity when you brake.How regenerative braking works is an interesting contradiction to how brakes in gas-powered cars work, because usually we lose energy when we brake rather than gain it. When you brake in a gas-powered car, you cause friction and heat, and all the kinetic energy of the car trickles away, so you use more gas stopping and then having to speed back up again. This is why we usually get better gas mileage on the freeway than in the city.Regenerative braking captures that energy instead of letting it trickle away. When you brake in a hybrid or EV, the car's motor reverses, which turns it into a generator that collects the kinetic energy and converts it into electricity. This is why hybrids and EVs tend to get better gas mileage in the city than on the freeway-lots of braking charges the battery!