title: How to access the value of a promise?
body: <p>I'm looking at this example from Angular's docs for <code>$q</code> but I think this probably applies to promises in general. The example below is copied verbatim from their docs with their comment included:</p>
  
  <pre><code>promiseB = promiseA.then(function(result) {
    return result + 1;
  });
  
  // promiseB will be resolved immediately after promiseA is resolved and its value
  // will be the result of promiseA incremented by 1
  </code></pre>
  
  <p>I'm not clear how this works. If I can call <code>.then()</code> on the result of the first <code>.then()</code>, chaining them, which I know I can, then <code>promiseB</code> is a promise object, of type <code>Object</code>. It is not a <code>Number</code>. So what do they mean by "its value will be the result of promiseA incremented by 1"? </p>
  
  <p>Am I supposed to access that as <code>promiseB.value</code> or something like that? How can the success callback return a promise AND return "result + 1"? I'm missing something.</p>