title: use info from one function to another
body: <p>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. </p>
  
  <pre><code>&lt;script&gt;
  $.get("http://ipinfo.io", function (response) {
  $("#address").html(response.city + ", " + response.region);
  }, "jsonp");
  &lt;/script&gt;
  
  &lt;div id="address"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>$(document).ready(function() {
  loadWeather('Baltimore',''); //@params location, woeid
  });
  </code></pre>
  
  <p>'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?</p>