Printing web storage value. | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 4

Printing web storage value.

localStorage.setItem("key1", "value1"); <!-- The value is said to be printed by code below. This, however, does not happen.--> alert(localStorage.getItem("key1"));

20th Nov 2018, 2:14 PM
Msizi
1 ответ
+ 6
https://code.sololearn.com/Wi2FU59lnODm/?ref=app Works fine for me on desktop. 🤔 Regarding the error on mobile though, it could be related to this: https://stackoverflow.com/questions/30061363 Edit: Take a look at Morpheus' note in his code here. SL app does not appear to support file access: https://code.sololearn.com/WT514EAUL617/?ref=app
20th Nov 2018, 2:22 PM
Hatsy Rei
Hatsy Rei - avatar