Answers for "how to create new local storage key if not exists"

5

how to check if local storage variable exists in javascript

if (localStorage.getItem("username") === null) {
  //...
}
Posted by: Guest on February-28-2020
0

how to check is the key of a localstorage is emopty

if (localStorage.getItem("username") === null) {
  //...
}
Posted by: Guest on November-09-2020

Code answers related to "how to create new local storage key if not exists"

Code answers related to "Javascript"

Browse Popular Code Answers by Language