I have an array of image elements, I want to find the biggest height value.
So, if I have
[
<img src="image1.jpg" width="300" height="400" />,
<img src="image2.jpg" width="200" height="500" />,
<img src="image3.jpg" width="100" height="200" />
]
The number that I want is 500.
What’s the best way to achieve this?
You can also try this strategy, assuming your images are stored in the array “imgs”: