title: sessionstorage works but returns "undefined" in console. why?
body: <p>I just build a jquery plugin to handle some data storages.
  when i try to read from storage, the result is the read item data. fine for now....</p>
  
  <p>when i add </p>
  
  <pre><code>sessionStorage.setItem('test','some data');
  </code></pre>
  
  <p>or remove</p>
  
  <pre><code>sessionStorage.removeItem('test');
  </code></pre>
  
  <p>a item, i allways get a <code>undefined</code> in the <code>console.log</code> </p>
  
  <p>but it do what i it should do.</p>
  
  <p>how can i get rid of the undefined, any ideas ???</p>
  
  <p>what i tried was</p>
  
  <pre><code>var result = sessionStorage.setItem('test','some data');
  </code></pre>
  
  <p>thought this would print it to a var but it won't ^^</p>
  
  <p>my code:</p>
  
  <pre><code>(function ($) {
  
      $.storage = {
  
          add: function(name,value){
  
              if(typeof value === 'object' )
              {   
                  /** convert object to json **/
                  value = JSON.stringify(value);
              }
              /** add to storage **/
              sessionStorage.setItem(name,value);
          },
  
          read: function(name){
  
              /** read from storage **/
              var item = sessionStorage.getItem(name);
                  try {
                      item = $.parseJSON(item);
                  }catch(e){}
              return item;
          },
  
          remove: function(name){
              /** delete from storage **/
              sessionStorage.removeItem(name);
          },
  
          clear: function(){
              /** clear storage **/
              sessionStorage.clear();
          }
  
      }
  })(jQuery);
  </code></pre>
  
  <p><strong>SOLUTION</strong></p>
  
  <p>I tried to add storage in console... when i used it in my script it returned nothing! SORRY</p>