This is my function:
function render() {
let list = document.getElementById('myNotes');
trashFolderModal = document.getElementById('allBlur');
list.innerHTML = localStorage.setItem(key, text);
for (let i = 0; i < titles.length; i++) {
const title = titles[i];
const note = notes[i];
list.innerHTML += card(title, note, i);
}
}
And here is my Note Website (you can see the source code): http://patrick-sterz.developerakademie.com/Notizblock2/index%282%29.html
setItem returns undefined.
I suspect you need to revisit what you want to do.
Normally we do this when the list changes
localStorage.setItem("list",JSON.stringify(myListArray));
and when we load the page we do a
let listContent = localStorage.getItem("list");
let myListArray = listContent ? JSON.parse(listContent) : [];