title: Promise Js: Wait till promise fulfilled
body: <p>I'm working with <a href="http://bluebirdjs.com/" rel="noreferrer">Bluebird</a> for promises in Node.Js, and was wondering how can I make a function return when the promise is fulfilled(completed).The behavior I want is :</p>
  
  <pre><code>function getItem(){
    functionReturningPromise.then(function(result){
      //do some operation on result
      return result;
    });
  }
  </code></pre>
  
  <p>However, the above implementation won't return anything since the promise isn't completed at the time of execution. What would be the best workaround around this? </p>
  
  <p>The purpose of getItem is to modify whatever functionReturningPromise returns, and then return it</p>