I am working on my local weather app but I am getting undefined when trying to access the weather type from the fcc api. Seems that the api isn’t working correctly.
Could someone figure it out for me, please or should I use another api?
so you’ll need to access it through its index, like:
let weatherType = data.weather[0].main;
let weather = data.weather[0].description;
Also as a tip, if you’re using Chrome (don’t know about the other browsers), you can just hover on the object properties in your console and a popup will show you how to access them: