The electric car was invented a little earlier: 1886. For a time, electric cars were popular because internal-combustion engines were primitive and electrical was easier to use. The legacy aftereffects can be seen in electric trollies, which were invented around the turn of the last century and are still competitive with buses.
Fun Fact: Trolley companies were called "traction" companies; they were named after the traction motor used in the trolleys.
Huh, neato.