title: How to get a subdomain using window.location?
body: <p>If I have a hostname such as: <a href="http://sample.example.com" rel="noreferrer">http://sample.example.com</a> and in Javascript I do <code>window.location.hostname</code>, would I get "example.com" or "sample.example.com"?</p>
  
  <p>If not, how would I be able to get sample.example.com?</p>