Comment vérifier si la variable de stockage locale existe en JavaScript
if (localStorage.getItem("username") === null) {
//...
}
Blue Bear
if (localStorage.getItem("username") === null) {
//...
}