---
title: "Comment by await on \"localStorage property in JavaScript\" | Hashnode"
description: "Every data stored in &quot;localStorage&quot; will be converted into &quot;String&quot;, and we will get a value with type of &quot;String&quot; when call local"
url: "https://hashnode.com/posts/localstorage-property-in-javascript/657da8a1ebc5df1f39652202/comment/658007c5c6ef1959c3473b65"
---

[Discussion](https://hashnode.com/posts/localstorage-property-in-javascript/657da8a1ebc5df1f39652202)

Comment [localStorage property in JavaScript](https://hashnode.com/posts/localstorage-property-in-javascript/657da8a1ebc5df1f39652202)

[await](https://hashnode.com/@await)

[Dec 18, 2023](https://hashnode.com/posts/localstorage-property-in-javascript/657da8a1ebc5df1f39652202/comment/658007c5c6ef1959c3473b65)

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.
