I need to identify and fix the error. What am I missing here and why? The temperature does not display.
<script type="text/javascript">
$.ajax({
url: 'https://api.weather.gov/gridpoints/EWX/155,90/forecast/hourly'
}).done(function(res) {
var temp = res.properties.periods[0].temperature;
});
document.getelementbyid('temperature').innerHTML = temp
</script>
<p>
The temperature is <span id="temperature"></span>F.
</p>
The temperature is F.
– lunik Mar 03 '21 at 19:47