Tell us what’s happening:
I have passed step 63 of learn local storage by building a todo app.
However, there is an error in the console that reads: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data.
The error does not prevent me from progressing to the next step, but the application no longer functions.
How do I resolve this?
Many thanks!
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
const taskData = JSON.parse(localStorage.getItem("data")) || [];
// User Editable Region
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0
Challenge Information:
Learn localStorage by Building a Todo App - Step 64