+ 1

NEED HELP!

Code isn't working D: I want it to output the storedNames, but it doesn't do anything. <script> var people = []; people[0] = prompt('username'); localStorage.setItem("people", JSON.strigify("people")); var storedNames = JSON.parse(localStorage.getItem("names")); document.getElementById("x").innerHTML = "STORED NAMES:" + storedNames ; </script> <body> <div id="x"></div> </body>

31st Jul 2017, 1:56 AM
❮вαιι–кιηgz❯ dario
❮вαιι–кιηgz❯ dario - avatar
4 Antworten
+ 5
Just visually: JSON.stringify (missing the 'n') Also: localStorage doesn't work in the app, last I checked. https://code.sololearn.com/WlEab312L9WR/?ref=app
31st Jul 2017, 2:04 AM
Kirk Schafer
Kirk Schafer - avatar
+ 4
localStorage (and more generaly cookies and web storage apis) doesn't works on android app', but did in website code playground ^^ @dario: Why your question is also tagged with c# and c++? That's not related at all, and should be confusing: are you sure to have tested your code in a 'web' code playground project, not another language?
31st Jul 2017, 6:38 AM
visph
visph - avatar
+ 2
That may not have the intended effect, even if it is an innocent idea to bring in more eyes. Though there is some real science behind static (white noise) amplifying patterns, I use Google because it gives me relevant results. But then: the flip side of SEO algorithms changing to demote "keyword loading" equals "I have to regularly check for selection bias", so...it's not like there's less work... No opinion here; just thinking.
31st Jul 2017, 2:33 PM
Kirk Schafer
Kirk Schafer - avatar
0
No,just tryna get people to come.
31st Jul 2017, 2:07 PM
❮вαιι–кιηgz❯ dario
❮вαιι–кιηgz❯ dario - avatar