async function populate() { const requestURL = 'https://api.openweathermap.org/data/2.5/weather?lat=55.54&lon=37.36&appid=ad27b4ba471e4bf31a8ce05578580de7'; const request = new Request(requestURL); const response = await fetch(request); const responseJson = await response.json(); console.log(responseJson.main, responseJson.weather[0].main); } populate(); const callAPI = async () => { const response = await fetch('https://api.openweathermap.org/data/2.5/weather?lat=44.34&lon=10.99&appid=ad27b4ba471e4bf31a8ce05578580de7', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Accept-Encoding': 'gzip, deflate, br', 'Access-Control-Allow-Methods': 'GET, POST, PUT, PATCH, POST, DELETE, OPTIONS', 'Access-Control-Allow-Headers': 'Content-Type', 'Access-Control-Max-Age': '86400' } }); const myJson = await response.json(); console.log(myJson); } callAPI();