FCC Weather application Difficulty showing icons on codepen

FCC Weather application Difficulty showing icons on codepen
0.0 0

#1

I’m currently doing the weather project and I’m able to display all the other required values for the project, but I can’t display the icon for weather. I’ve tried concatenating it into an img src tag, but when I call the icon through the api, I get undefined. Is there another way I should be approaching this?

console.log(data.weather[0].icon);

$("#icon").html(’<img src="’+data.weather[0].icon+’/>’);
});

Any help would be appreciated


#2

$("#icon").html(’’);

I meant to add this line instead.


#3

Can you provide a link to your current code?