How do i fix this forEach() to return all the items in the thingsTodo array? It only returns the last item now. Works perfectly fine with plain arrays but as soon as i put objects in the array it only returns the last item
Yes, that works great. But i want to have it this way so that new tasks can be added via input field and push them into
thingsTodo.push({task: input.value})
These sould be JSON stringified after input and check if string is found and return JSON.parse(thingsTodo) and add to the array. The reason for this is that i want to add them in localStorage with key and value. But only show the value in the divcontainer. It’s just i’m a bit lost on how to do this exactly.