title: Uncaught SyntaxError: Unexpected end of input line 1
body: <p>Hi there I am trying to figure out what is going wrong. I am getting the error </p>
  
  <blockquote>
    <p>Uncaught SyntaxError: Unexpected end of input in line 1</p>
  </blockquote>
  
  <p>which is</p>
  
  <pre><code> var itemList = new Array();
  </code></pre>
  
  <p>A snippet of the code is included</p>
  
  <pre><code>var itemList = new Array();
  
  $( document ).ready(function(){
  var $newItem = $('#newItem');
  var $itemList =$('#itemList');
  var itemTouchStart;
  var itemTouchEnd;
  var itemTouchStartX;
  var itemTouchEndX;
  
  if( window.localStorage) //when application starts check if there is data
  {
      itemList = JSON.parse(window.localStorage.getItem('itemList'));
  }
  
  if(null !== itemList)
  {
      for (i=0;i&lt;itemList.length; i++)
      {
          var itemNew = '&lt;li data-key="'+ itemList[i].key +'"&gt;&lt;span&gt;' 
  +itemList[i].item +'&lt;/span&gt;&lt;/li&gt;';
          $itemList.append(itemNew);
      }
  
  }
  else
  {
      itemList = new Array();
  }
  </code></pre>