I am on the weather app and I understand that it is not a big deal if the world has access to my API key for this project, however, I would like to know if I can.
Code pen put out a suggestion that we can use local.storage- here is a snippet that aims to put data there and check if the data is stored. I can not access the data store from within code pen.
Any ideas how to make use of the browsers local data store?
var storage = (function() {
var dataStore = "tests";
var result;
try {
localStorage.setItem("dataStore", dataStore);
result = localStorage.getItem(dataStore) == dataStore;
return result + document.write(result, " ", window.localStorage.getItem(dataStore));
} catch (exception) {
return false + document.write("false");}
}());