We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc9fc23 commit 1c70a0eCopy full SHA for 1c70a0e
1 file changed
100Questions/100_JS_Que
@@ -683,7 +683,8 @@ const user = {
683
console.log(JSON.stringify(user)) //convert into a string
684
console.log(JSON.parse(JSON.stringify(user))) //convert into an object
685
686
-localStorage.setItem("testAsKey", JSON.stringify(user))
+localStorage.setItem("testAsKey", JSON.stringify(user)) {"name":"priya","age":100}
687
+localStorage.setItem("testAsKey", user) //[object Object] beacuse we are forcefully trying to convert in a string
688
------------------------------------------------------------------------------------------
689
690
0 commit comments