I have this codepen.
http://codepen.io/Casfan/pen/ZOWmdv?editors=1111
Its a project for freecodecamp where you have to get the local weather.
I know there are solutions out there showing exactly how to do it but I want to know why mine is not working so I can learn.
The get weather function works if you pass in a hardcoded city.
Its my get location that is not returning what I am expecting data.city should be the city name but its not working in this instance.
Any ideas on what I am doing wrong.
thanks
http://codepen.io/Casfan/pen/ZOWmdv?editors=1111
Its a project for freecodecamp where you have to get the local weather.
I know there are solutions out there showing exactly how to do it but I want to know why mine is not working so I can learn.
The get weather function works if you pass in a hardcoded city.
Its my get location that is not returning what I am expecting data.city should be the city name but its not working in this instance.
Any ideas on what I am doing wrong.
thanks