title: Get the value of a promise and assign to variable
body: <p><code>utility.fetchInfo()</code> returns a Promise object. I need to be able to get the value of this Promise object and assign the value of it to a variable that I can then use later on in my code. </p>
  
  <p>At the moment, I can happily print the value of <code>result</code> to the console, but I need to be able to assign this value to <code>myVal</code>. So far, I've tried a lot of things and nothing has worked.</p>
  
  <p><code>var myVal = utility.fetchInfo().then(result =&gt; console.log(result));</code></p>
  
  <p>Thanks</p>