title: Uncaught (in promise) TypeError: localStorage.setItem is not a function
body: <p>I want to create a project with localstorage, but when I save it with <code>setItem</code> error show up like this:</p>
  <blockquote>
  <p>Uncaught (in promise) TypeError: localStorage.setItem is not a
  function</p>
  </blockquote>
  <p>This is my code:</p>
  <pre><code>var dataPerson = {
      name: &quot;Jhon&quot;,
      old: 20,
      family: &quot;Doe&quot;,
  };
  console.log(dataPerson);
  
  if (typeof(Storage) !== &quot;undefined&quot;) {
      // Store
      localStorage.setItem(&quot;data&quot;, JSON.stringify(dataPerson));
  } else {
      alert(&quot;Sorry, your browser does not support Web Storage...&quot;);
  }
  </code></pre>
  <p>I use jQuery v3.4.1, Thank you</p>