How to read or store variables in JS? I use localstorage, but I have a lot of variables. Moreover, there are Boolean variables, which are very inconvenient to use. Localstorage can only retrieve strings, and numbers are relatively convenient, but it is very troublesome to read a large number of variables and Boolean types.