t sprinkling <code>try</code>/<code>catch</code> blocks everywhere.</p>
<hr>
<h3 id="shorthands"><a href="#shorthands">Shorthands</a></h3>
<p>Sometimes, you already have a value, but want to wrap it in a Promise. It&#39;s for this purpose that <code>Promise.resolve</code> and <code>Promise.reject</code> exist.</p>
<pre><code class="lang-javascript">// suppose this list came from localStorage
var users = [{id: 1, firstName: &quot;John&quot;, lastName: &quot;Doe&quot;}]

// in that case, `users` may or may no