function requestWeatherData(cntr) { var xhr = new XMLHttpRequest; xhr.open("GET", `MY API KEY AND ID HERE`); xhr.onreadystatechange = function () { if (xhr.readyState === XMLHttpRequest.DONE) { cntr.weatherData = JSON.parse(xhr.responseText) } } xhr.send(); }