localStorage set and remove with a function

localStorage HTML5 - JQuery example.

by Andrew Pougher

HTML

<div></div>

JavaScript

if (!localStorage.icns){
localStorage.setItem("icns", "on");
  
        $("div").html("Your Local Storage is Set");
    fff()
        }else{
           $("div").html("done");
  localStorage.removeItem("icns")
      }

        
      
        

      function fff(){ alert("you just called a function too :)")}