How to sum the results of a fetch using multiple functions?
问题 I am working with OpenWeatherMapAPI to calculate the sum of precipitation for the previous 5 days. To do this I have 5 async functions with api calls using the fetch api. The data received, that concerns me, is the hourly historic weather data spanning a 24 hour period. Full code bellow . The json response is stored to a constant (Ex. const histData1 ) where it is then iterated through to sum all of one values over that given 24 hour period. Note: humidity is used as a proof of concept