set a boolean value in localstorage javascript and then use it to change code example
Example: js localstorage boolean
let storeMe = {
myBool: true
}
localStorage.setItem('test', JSON.stringify(storeMe))
let result = JSON.parse(localStorage.getItem('test'))