Weather App Project

Hello, I am a newbe and i am at the weather app project! I have written some code trying to implement the fcc api for the weather but i am stuck and dont know where are my mistakes! here is the code i have written this far!
Any advice will help!

Regards! :slight_smile:

  • First you pushed lat/lon into a variable. You want to pull that in your getJSON, but you did just make them part of the URL string so they will not be replaced with the variables.


–> β€œ” + long + β€œ&lat=” + lat

then check if you are actually getting the right properties from the returned JSON

i did the url change but i am stuck at the getJSON function below

You need to look at the returned JSON, you are not accessing the values properly:

Example :[0].icon

… Read again how to access JSON properties…