I have the following code:
var currentTemp = 0;
  $.simpleWeather({
    location: 'New York, New York',
    woeid: '',
    unit: 'f',
    success: function(weather) {
      currentTemp = weather.temp;
    },
    error: function(error) {
      currentTemp = 150;
    }
  });
  $('#degrees').text(currentTemp);
For some reason, the variable currentTemp's value, when set inside the simpleWeather function, doesn't carry outside of this function. What can I do?
 
    