title: parse QueryString in javascript
body: <p>I know there are various libraries or methods to get the data from a queryString. However, I'm trying to learn javascript a bit so decided to write my own, as follows:</p>
  
  <pre><code>function parseQueryString() {
      var qs = window.location.href.split('?')[1];
      var item = qs.split('&amp;');
      var data = {};
      for (var i=0; i &lt; item.length; i++) {
          key = item[i].split('=')[0];
          value = item[i].split('=')[1];
          data[key] = value;
      }
      return data;
  }
  </code></pre>
  
  <p>Does the above look like it's missing anything, or have any shortcomings? If so, how can I improve it?</p>