title: Want to return inside function, but it returns without running
body: <p>My function makes a few calls to an observer and I do not want the function to return until everything is complete. I tried putting the return inside the subscribe, but then when I call on the function I get an error since its type void without the return being the last thing.</p>
  
  <pre><code> ReadyQ(){
      var isReady;
      this.Room.subscribe(snapshot =&gt; {
        if(snapshot.Ready=="true"){ 
           console.log("Ready");
           isReady =true;
        }else{
          console.log("Not Ready");
          isReady = false;
        }
    });
    console.log('ISREADY?',isReady}); //undefined
    return isReady;  //returns undefined
  }
  </code></pre>