Need help with weather app. Can't get icon url! Why?

Hey,

I’ve problems figuring out how to output my weather icons from the fcc weather api. It’s bothering me so much and i can’t find answers on the internet. I have added alert(icon) to show whats actually going on but it says ‘undefined’. Or is there any other way to solve it. feel free to fork my pen.

Here’s my project pen: https://codepen.io/Lexry/full/dzeOpz/

Also, disregard the layout. I plan to work the css3 last :slight_smile:

Okay, I figured that part out but i’m having trouble with this code.

$('#icon').html("<img src = "icon"></img>");

yeah, for some reason, i had to restart my computer and it suddenly showed up… Thanks for checking out. :slight_smile:

$('#icon').html("<img src = "icon"></img>");

Why doesn’t this work?