I’m so stuck and confused with this. Googling doesn’t help me. After getting JSON data from openweathermap api:
temp.innerHTML=json.main.temp; works and it updates the respective span.
But temp = json.main.temp; and then temp.innerHTML =temp; doesn’t work.
Codepen Link: https://codepen.io/Smokahontas/full/OvorwK/
Note: Also, Chrome is giving me problem with reading json data. But in Firefox it works totally fine!