title: javascript use response from function in calling function
body: <p>I've got a basic example of of the node-geocoder, but I can't get the response to bubble up into the calling function</p>
  
  <pre><code>    var address = userUpdates.address + " " + userUpdates.city + ", " + userUpdates.state + " " + userUpdates.zip;
  
     geocoder.geocode(address)
          .then(function(res) {
                console.log(res);
          })
          .catch(function(err) {
               console.log(err);
         });
  </code></pre>
  
  <p>The console.log produces the correct JSON</p>
  
  <pre><code>[ 
    { 
      latitude: 35,
      longitude: -78.5,
      country: 'United States',
      city: 'Clayton',
      state: 'North Carolina',
      stateCode: 'NC',
      zipcode: '27520',
      streetName: 'Main St',
      streetNumber: '100',
      countryCode: 'US' 
     }
   ]
  </code></pre>
  
  <p>but I can't assign the res to anything  that will persist outside the geocoder.geocode function</p>