check if local storage is used or empty

Solutions on MaxInterview for check if local storage is used or empty by the best coders in the world

showing results for - "check if local storage is used or empty"
Eleonora
05 Sep 2018
1if (localStorage.length > 0){
2    //Items are stored in local storage
3}else{
4    //Local storage is empty
5}