Every data stored in "localStorage" will be converted into "String", and we will get a value with type of "String" when call localStorage.getItem("key"). Using JSON.parse can solve this matter, but it is noted that if the type of primitive value of the variable is "String", we will get a error.
yi nico
Super helpful and well written!Hope bloggers share more such blogs,This address also allows people to learn knowledge gtone.top