Skip to content

Instantly share code, notes, and snippets.

@nadiamode
Created November 10, 2012 01:00
Show Gist options
  • Save nadiamode/4049332 to your computer and use it in GitHub Desktop.
Save nadiamode/4049332 to your computer and use it in GitHub Desktop.
A CodePen by nadiamode.
var cowdesc = "the cow is of the bovine ilk, "+
"one end is for the moo, the "+
"other for the milk";
var cowdef = {
"ilk":"bovine",
"legs":4,
"udders":4,
"purposes":{
"front":"moo",
"end":"milk"
}
};
window.localStorage.setItem('describecow',cowdesc);
console.log(
window.localStorage.getItem('describecow')
); // => the cow is of the bovine...
window.localStorage.setItem('definecow',JSON.stringify(cowdef));
console.log("Hey.. " + JSON.parse(window.localStorage.getItem('describecow'))
);
var zenpen = localStorage.getItem('zen-painting-setting');
document.write(zenpen);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment