I am trying retrieve a value from one function and would like to use that value in another function. This function returns a city, state and I present that on screen. 

```
<script>
$.get("http://ipinfo.io", function (response) {
$("#address").html(response.city + ", " + response.region);
}, "jsonp");
</script>

<div id="address"></div>

```

But I would like to use the city value for another piece of JS that uses city values to return current weather. That code is here:

```
$(document).ready(function() {
loadWeather('Baltimore',''); //@params location, woeid
});

```

'Baltimore' is currently hard-coded in the JS and I would like the returned city value from above to be placed in the weather function. The weather function only seems to accept the city as a string and not a code snippet like the answers below have presented. Can I make the resulting city into a variable that is then passed to the weather function?