Using freecodecamp's weather api

I would also point out that you’re going to run into an asynchronous problem - that $getJSON needs to be inside the callback to the geolocation or the $getJSON is going to run before those values are set. This recent thread discusses a similar issue.