How is the positioning of the eyes an adaptive advantage for a frog?

So the frog can see prey and preditors on bothsides of its body with ease. frogs have eyes on the top of their head so the do not have to expose themselve to predators if they want to look around
The positioning of a frog's eyes constitutes an adaptive advantage for the species in two ways. First, it enables a frog to see in an 160-degree arc, which is much wider than most other animals, and enables to frog to spot predators quickly. Second, the frog is able to hide most of its body under water or within soil or other ground cover while maintaining visual connection with its surroundings. This, too, affords the frog an outstanding survival advantage.
The eyes of a frog are on top of their head so they can detect predators from above. Since frogs live in the water or on the ground, the danger always come from above. In treefrogs, the eyes are positioned rather on the sides of the head.