title: SweetAlert2 - Start with showLoading () and close after executing a function
body: <p>I need to open SweetAlert with a loading, execute a JS function "myFunc()" and close SweetAlert.</p>
  
  <p>I invoke SweetAlert with a loading:</p>
  
  <pre><code>Swal.fire ({
     title: 'Wait ...',
     onBeforeOpen: () =&gt; {
       Swal.showLoading ()
     }
  })
  </code></pre>
  
  <p>Where should I put myFunc () in the code?</p>