title: how I can call promise synchronously
body: <p>calling an Async function synchronously</p>
  
  <pre><code>//return Boolean value
  function SyncValue(){ 
  var promise = new Promise((resolve, reject) =&gt; {
      if(/* asynchronous code execution is successful */) {
       return true;
      } else {
       return false;
      }
      return promise.then(returnValue =&gt;{ return returnValue});
  });
  </code></pre>
  
  <p>call function </p>
  
  <pre><code>if(SyncValue()){
     //here do the logic 
  }
  </code></pre>
  
  <p>how I can lock the calling for the function to retrieve a value from "syncValue" function</p>