Local Weather App - switch measurement

Currently I’m working on the local weather app challenge, and i got some problem here with the button to switch between Fahrenheit and celcius. Here is my codepen, i wonder what’s wrong with the code because the button is not switching celcius into Fahrenheit.

Thank you.

Codepen link

There are a few things that may contribute to your issues:

  1. There were curly braces missing from your if/else condition.
  2. The icon, temp and other variables are defined in the getJSON block and are thus not accessible outside of that block.

yea the curly braces did missing… my fault… but i guess i found that &deg that created the trouble…