title: Returning a promise in JavaScript
body: <p>I have a promise here:</p>
  
  <pre><code>myPromise: -&gt;
    return new Em.RSVP.Promise (resolve, reject) -&gt;
      # ...
      resolve 5
  </code></pre>
  
  <p>How do I write a function to return the promise from <code>myPromise()</code>?</p>
  
  <p>This is what I've tried:</p>
  
  <pre><code>myPromise2: -&gt;
    return myPromise()
  
  myPromise2().then -&gt;
     console.log 'this is never called!'
  </code></pre>