So, I’m attempting to include Skycons into my weather app (using the Dark Sky API). It’s the last thing I need to add, but of course it’s giving me the most difficulty. After I create a new instance of Skycon, anything below it comes back blank. Here’s what I have:
//Skycons
var iconRequest = forecast.currently.icon;
var icons = new Skycons();
var iconList = [
"clear-day","clear-night","partly-cloudy-day","partly-cloudy-night",
"cloudy", "rain", "sleet", "snow", "wind", "fog"];
console.log(iconRequest);
When I cal iconRequest, nothing shows up in the console, but if I call it before I create “icons”, it returns with what the DarkSky.currently.icon should return (“clear-night”, in this case). I’m not sure what I’m doing wrong here, honestly.
Here’s a link to the Pen: https://codepen.io/Actatus/pen/RVEvwb