How to check whether a Storage item is set? - Stack Overflow

PHOTO EMBED

Thu Mar 25 2021 11:22:21 GMT+0000 (UTC)

Saved by @roberth

if (localStorage.getItem("storageVariable") === null) {
  //...
}
content_copyCOPY

https://stackoverflow.com/questions/3262605/how-to-check-whether-a-storage-item-is-set