Battling against electric Pokemon is challenging because they only have one weakness and a few different resistances. Worthy opponents in any battle, for sure!
In general, electric types are some of the fastest in the game and have high special attack which allows them to move first and hit hard!

Electric type Pokemon are weak to:
Use ground type attacks to deal double damage against electric types. It's super effective!

Ground type is immune to electric type attacks
Use a ground type Pokemon to take zero damage from an opponent's electric type attacks.

These types resist electric type attacks:
Use Pokemon of these types to take half damage from an opponent's electric type attacks. It's not very effective.

Great Pokemon to use against electric types:
These Pokemon learn super effective attacks or have useful resistances (or both!)
Excadrill (ground / steel)
Flygon (ground / dragon)
Swampert (ground / water)
Hippowdon (ground)
Nidoking (ground / poison)
Torterra (ground / grass)
Read more: The ULTIMATE Pokemon Type Weakness Guide
Good attacks to use against electric type Pokemon:
Earthquake (ground)
Earth power (ground)
Dig (ground)
Drill run (ground)
Mud bomb (ground)
High horsepower (ground)
What's good against..?
bug | dark | dragon | electric | fairy | fighting | fire | flying | ghost | grass | ground | ice | normal | poison | psychic | rock | steel | water