+ 1
I am getting an error which I don't know why is coming
https://code.sololearn.com/Wtk04JQhhS43/?ref=app The error is :- Uncaught SecurityError: Failed to read the "localStorage' property from 'Window': Access is denied for this document. Line: 4
5 Answers
+ 5
Sololearn android app doesn't allow access to local storage, but if you run your code using iOS Sololearn app or browser, then local storage is accessible.
+ 1
ODLNT any alternatives I can use or atleast anything which can depict it's behaviour
+ 1
As an alternative, I suggest using your mobile browser and visit Sololearn's website to run your code.
Refactored slightly to avoid the uncaught type error messages.
https://code.sololearn.com/W7SPpZ5nowWb/#js
0
You can use reactjs with cdn on sololearn. You can store data in state in Reactjs