How can i make the result of this fetch to be accessible globally in other functions? I'm new to coding and haven't found anything online related to this.
fetch('https://api.binance.com/api/v3/avgPrice?symbol=BTCUSDT')
.then(r => r.json()
.then(j => console.log(parseFloat(j.price).toFixed(2))));