Script is not populating data in my weather app


Thanks for all who have advised me so far.

I have been following a step by step tutorial on YouTube on how to build a weather app. I have tried to make a few adaptations like using Bootstrap for the layout and adding a couple of information blocks. I have looked exhaustively for typos and have used the Analyze function in CodePen and no errors are showing.

Some of the data I have specified like the temp, wind speed etc are showing up. But the location is showing up as Undefined and I can’t get my icon to display.

The project is here: if you wouldn’t mind taking a look.

All the best,



Those two lines should use the same property for the location to appear.

For the icon i would recommend inserting an img tag inside the div you used for the image and assigning the “icon” id to the img tag.
The icon didn’t work because div tag doesn’t have a src attribute.



Also, nice use of Codepen Projects. I haven’t seen anybody (including myself) take advantage of it. :thumbsup:


Awesome. Thanks. That works.

All the best,