Promise in the if statement (Javascript) : <p>I want to use promise results in the if statements, however when I try to, I get something like this:</p>

<pre><code>const promise = new Promise((resolve, reject) =&gt; {
setTimeout(() =&gt; {
  resolve(5 * 2)
}, 1000)
})

console.log(promise.then(i =&gt; i) === 10) //false
</code></pre>

<p>Is it possible to somehow wait for the extraction of the promise result in this case?</p>
