title: opening a new tab with a link using window.open() and i want that tab close automatically after 15sec
body: <p>I am using window.open function in a button with onclick event. I want to open link in new tab and new tab should be closed after 15 seconds. So the countdown should be on the current page where button exists.
  Code snippet:</p>
  
  <pre><code>&lt;button onClick="openlike()"&gt;Like&lt;/button&gt;
  &lt;script&gt;
  
          function openlike(){
              var likewindow = window.open('http://www.google.com');
          }
  
  &lt;/script&gt;
  </code></pre>