Step 13
Let's update the updateUI
function:
function updateUI(location, forecast) {
document.getElementById("name").innerText = location.LocalizedName;
document.getElementById("condition").innerText = forecast.WeatherText;
document.getElementById("temperature").innerText = forecast.Temperature.Imperial.Value;
}
Save the file and observe the changes:
Let's add one final touches to the application! Update the updateUI
to include the Fahrenheit symbol next to the reported temperature.
- document.getElementById("temperature").innerText = forecast.Temperature.Imperial.Value;
+ document.getElementById("temperature").innerHTML = `${forecast.Temperature.Imperial.Value} ℉`;