title: Promise in javascript
body: <p>I have problem in my javascript code
  I want to swal a message then back to top But this swal and back to top same time, then this again to last position. How i can do it. Sorry for my english</p>
  
  <pre><code>promise.then(function(){
      swal({
        title: "Ok",
  
        type: "success",
        confirmButtonText: "Close"
      });
  })
  .then(function(){
         $('html,body').animate({
      scrollTop: 0
  }, 700);
  })
  </code></pre>