title: How do I assign the resolved value of a .then to a variable?
body: <p>I have a promise called <code>goodNight</code> and I am trying to chain it to a <code>.then()</code> that will assign the resolved value to a variable called <code>night</code>. I am having trouble figuring this out and any help would be greatly appreciated. Thanks!</p>
  
  <p><code>var night = "";</code></p>
  
  <p>Here is what I am trying: </p>
  
  <pre><code>goodNight.then(function(night) {
      return Promise.resolve(night)
  })
  </code></pre>