Created
November 10, 2012 01:00
-
-
Save nadiamode/4049332 to your computer and use it in GitHub Desktop.
A CodePen by nadiamode.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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