title: How to have localStorage value of true?
body: <p>I was wondering if its possible for localStorage to have a Boolean value instead of a string? </p>
  
  <p>Using JS only no JSON if its impossible or can be done in JS a different way please let me know thanks</p>
  
  <p><a href="http://jsbin.com/qiratuloqa/1/" rel="noreferrer">http://jsbin.com/qiratuloqa/1/</a></p>
  
  <pre><code>//How to set localStorage "test" to true?
  
  test = localStorage.getItem("test");
  localStorage.setItem("test", true); 
  
  if (test === true) {
    alert("works");
  } else {
    alert("Broken");
  }
  
  
  
  /* String works fine.
  
  test = localStorage.getItem("test");
  localStorage.setItem("test", "hello"); 
  
  if (test === "hello") {
    alert("works");
  } else {
    alert("Broken");
  }
  
  */
  </code></pre>