Skip to content

Instantly share code, notes, and snippets.

@godrix
Created July 19, 2018 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save godrix/92332052c85a52dd63956ed8887e60f0 to your computer and use it in GitHub Desktop.
Save godrix/92332052c85a52dd63956ed8887e60f0 to your computer and use it in GitHub Desktop.
var ls = window.localStorage;
var array_ls = [];
for(x in ls){
array_ls.push(x);
console.log(x);
}
for(i=0;i<6;i++){
array_ls.pop();
}
for(i=0;i<=array_ls.length;i++){
console.log(array_ls[i]+" => "+localStorage.getItem(array_ls[i]));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment