Skip to content

Commit 9acbf08

Browse files
authored
Update 100_JS_Que
1 parent 1c70a0e commit 9acbf08

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

100Questions/100_JS_Que

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,8 @@ console.log(JSON.parse(JSON.stringify(user))) //convert into an object
685685

686686
localStorage.setItem("testAsKey", JSON.stringify(user)) {"name":"priya","age":100}
687687
localStorage.setItem("testAsKey", user) //[object Object] beacuse we are forcefully trying to convert in a string
688+
689+
JSON.parse(localStorage.getItem("testAsKey")) //will get as a object
688690
------------------------------------------------------------------------------------------
689691

690692

0 commit comments

Comments
 (0)