title: Try to get Javascript functions to run Synchronously
body: <p>I'm having trouble with the following code snippet.  My init method needs to run and complete the getLocation() function before the initializeMapp() and geoListen() can run.  I have rsvp.js linked as a resource, but not quite sure how to implement.  I also tried the jQuery $when.done method.   Any help is appreciated.</p>
  
  <p>jQuery Method:</p>
  
  <pre><code>//initial page load method
  function init() {
  
      //get user location then builds map and listens to database
      $.when(getLocation()).done.(function () {
  
         //build map now that you have user location
          initializeMap();
  
         //Starts listening to database changes
         geoListen();
  
      })
  
  }
  </code></pre>
  
  <p>RSVP method:</p>
  
  <pre><code> //initial page load method
   function init() {
  
        //get user location then builds map and listens to database
       getLocation().then(function () {
  
       //build map now that you have user location
       initializeMap();
  
       //Starts listening to database changes
       geoListen();
  
    })
  
   }   
  </code></pre>