Accessing An Objects Property Inside A Function
I'm trying to access objects properties inside an array in my code to render the text values of input boxes restored after a refresh from the local storage but for some reason when
Solution 1:
I have fixed this after changing my appStart() function to this :
functionappStart() {
notes = JSON.parse(localStorage.getItem("timeBlockNotes"));
for (let i = 0; i < notes.length; i++) {
timeBlockInput[parseInt(notes[i].id)].value = notes[i].value;
}
}
thank you guys for your comments and answers.
Post a Comment for "Accessing An Objects Property Inside A Function"