API FCC weather api undefined values

API FCC weather api undefined values
0.0 0

#1

Here Is my pen https://codepen.io/fotisoikonomou/pen/yaKBkN

for a reason I get the fcc api values undefined…

Please if anyone knows help me


#2

I edited the link because it says the debug view already expired.


#3

The page is displaying the weather (though the temperature only appears when you click the button). Probably a glitch on the API’s part? Or is it something else?


#4

It works for me, i get my weather and location.


#5

Your app works fine for me!


#6

that thing …the temperature is shown only when clicked?


#7

You can copy the code that displays the °C temperature just after you set the °F value. However, this will introduce duplicate code, so you might want to enclose that in a function.

    var fTemp = data.main.temp * 9 / 5 + 32;

    $("#temp").html(
      "<h3>The current temperature in " +
      data.name +
      " is: " +
      data.main.temp +
      "&#8451;</h3>"
    );

    $('.change').on('change', function() {...});

#8

I found a small mistake with the town. (i went in inspect and censored my location)

Theirs no space between is and town