title: Close window after confirmation box
body: <p>Need the following <strong>code</strong> to work and make a confirmation alert appear after <strong>clicking</strong> on a button. </p>
  
  <p>It's kinda of a <strong>"exit website button".</strong></p>
  
  <blockquote>
    <p><em>Confirmation appears:</em>
    <strong>Clicks "OK" ></strong> current window close;
    <strong>Clicks "Cancel" ></strong> confirmation alert close;</p>
  </blockquote>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;a href="#"&gt;&lt;i class="fa fa-power-off" onclick="closeWebsite()"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/div&gt;
  </code></pre>
  
  <p><strong>Javascript</strong></p>
  
  <pre><code>&lt;script&gt;
    function closeWebsite(){
      window.close();
    }
  &lt;/script&gt;
  </code></pre>
  
  <p>Where's my mistake? I'm currently learning <strong>Javascript</strong>.</p>