+ 1
Why does this not display the count
When I log the count, it should continue going up by 1 for each time I hit run, why does this not happen https://code.sololearn.com/WgKxYHDNHXRe/?ref=app
6 Respostas
+ 2
https://code.sololearn.com/WXxhfDY6bz0P/#html
+ 1
Pierson
In your code, console.log(Number) is telling the computer to display js global function Number.
To display the contents of localStorage.Number use console.log(localStorage.getItem("Number")) or
console.log(localStorage.Number)
Btw - because Number is a js global function you should avoid using the word Number in any other manner. It can cause some confusion.
+ 1
Thank You
+ 1
You are welcome.
From both of us.😁
0
Wait so what do I use instead, I changed it to watch instead to get rid of the function "Number", but now it says that "Watch" is undefined even though nothing has changed except the variable
https://code.sololearn.com/WgKxYHDNHXRe/?ref=app
0
😂 I swear it had 2 different names
Full Code Can Be Viewed Here:
https://code.sololearn.com/WfF1U5tJOzlG/?ref=app