title: local Storage is not defined : JQuery
body: <p>I am using this piece of code inside a javascript function.
  But when I run the application it gives a reference error that local Storage is not defined.</p>
  
  <pre><code>localStorage.setItem(result.key+authAppParams.application , result.key);
  </code></pre>
  
  <p>Why this occurs?
  Why can't I use this inside a function?
  Since it is a setItem and all the releated values are inside the method I cannot define the local Storage globally. </p>
  
  <p>How can I avoid this issue and make this work?</p>