API weather app not working

So I’ve been working along to a youtube video on how to build an API weather app, but the API calls don’t seem to work in my browser. I loaded up the actual app built by the guy in the video in codepen and it doesn’t work in my browser either. I assume it’s some kind of browser settings preventing the API calls form working properly? Any help would be appreciated. Here is the finished app https://codepen.io/Middi/pen/LQWwwB and here is my 99% complete version https://codepen.io/MarcelPenn/pen/gqZLLZ

What does the console show, do you not see the data object?

Also, remember to pass the data to your updateDOM() function.

1 Like

It just displays the error function value “there was an hour”. How do I pass the data to the updateDOM() function? Can you elaborate a little more on that maybe?

1 Like

In the weather function pass data as an argument to updateDOM when you call it.


In the definition for the updateDOM function add data as a parameter.

function updateDOM(data) {

I don’t understand the error you say you’re getting, can you copy paste it here?

1 Like

Oh right, literally ‘data’. I was thinking like random data, sorry it’s been a long day lol. I’ll give that a try and and tinker with it a bit further. Appreciate the help!

1 Like