Crocodiles can eat electric fish, as they are diverse predators, including fish, amphibians, reptiles, birds and mammals.
Electric fish are famous for their ability to generate strong electric shocks, which they use to stun their targets and defend themselves from predators.
However, it should be noted that electric fish are commonly found in freshwater habitats in South America, while crocodiles are found in many habitats worldwide, including freshwater and saltwater environments.
Therefore, the possibility of an alligator and an electric fish meeting is unlikely.
If an alligator has caught and eaten an electric fish, there is a possibility that the electric shock generated by the fish will be able to harm the crocodile.
However, crocodiles have thick skin and strong muscles that can help protect them from electric shocks.
Anyway, it should be remembered that all living things play important roles in their ecosystems, and that one species cannibalize another is a natural part of the food chain.