Check for an anchor
<p>I would like to check if the current page has an anchor</p>

<p>so I am using this</p>

<pre><code>var qs = window.location.hash;
</code></pre>

<p>then checking if qs is not an empty string</p>

<pre><code>if (qs !== '') {
</code></pre>

<p>Is this the correct way to do that? It seems to work, but I am confusing myself reading about JavaScript's various ways to check for null/undefined/empty string.</p>
