title: writing a conditional for a button that goes back in the browser's history
body: <p>I have an age restricted modal and when the user clicks "no" it goes back a page in their history, but what if a user accessed the webpage on a fresh tab? They don't have a history? Can the button take them to a specific url?The browser's default homepage? Close the tab?</p>
  
  <p>This is what I currently have:</p>
  
  <p><code>&lt;a onClick="goBack()"&gt;Go Back&lt;/a&gt;</code></p>
  
  <pre><code>&lt;script&gt;
      function goBack() {
        window.history.back();
        return false;
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>In terms of UX, out of the three scenarios I've given, I mean, I'm not sure what's the best, but I'm open to whatever is the most clean to accomplish.</p>