title: assign resolve values to global variables - promises
body: <p>Rather than use callbacks, I decided to use promises.</p>
  
  <p>I resolve the variable which holds a price and then I call .then to handle it like this.</p>
  
  <pre><code>SomeAsyncThing("fifa 17").then(function(value){
  
      console.log("value " + value);
  });
  </code></pre>
  
  <p>How can I assign the value to a global variable to use elsewhere in JS?</p>
  
  <p>Am I missing something obvious? I've tried defining x = 0; at the top, then assigning value to x and calling console.log out of this function but I get 0 rather than the assigned value.</p>