title: Redirect to other page on alert box confirm
body: <p>This is a piece of my function with <strong>the question</strong> in it:</p>
  
  <pre><code>function deletePost() {
      var ask = window.confirm("Are you sure you want to delete this post?");
      if (ask) {
          window.alert("This post was successfully deleted.");
  
          /* How to redirect to another page on confirm? */
  
      }
  }
  </code></pre>
  
  <p>Pure Javascript needed.</p>