HTML5 APPLICATIONS DEVELOPMENT MANUAL

(lu) #1

Same logic for :


var currentWeather = wd.weather[0].description;


We have an array from the first element, the description.


For the temperature we will use var currentTemp = wd.main.temp;


And for the icon, from the weather array, the first element: the icon


data.


var icon = wd.weather[0].icon;

Free download pdf