Could someone please point out what’s wrong with my code?
I keep getting the same error message " You should create a div
element with the class task
."
Step 18
Create a div
element with the class of task
. Utilize template strings to set the id
attribute of the div
to the id
you destructured from the task data.
taskData.forEach(({id, title, date, description}) => {
(tasksContainer.innerHTML += ``);
const div = document.createElement('div');
taskDiv.className = 'task';
taskDiv.id = `task-${id}`;
});
});
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Challenge Information:
Learn localStorage by Building a Todo App - Step 18