Hello,
I’m trying to complete this step of project but I’m unable to get past it due to some error I’m not catching.
The task is to “Use arrow syntax to create an updateTaskContainer function. Then move the taskData.forEach() and its content into it.” and the error I’m getting when submitting the code is “You should move taskData.forEach() and its content into the updateTaskContainer() function.” which I did with previous passing code but no luck:
const updateTaskContainer = () => {
taskData.forEach(({ id, title, date, description }) => {
tasksContainer.innerHTML += `
<div class="task" id="${id}">
<p><strong>Title:</strong> ${title}</p>
<p><strong>Date:</strong> ${date}</p>
<p><strong>Description:</strong> ${description}</p>
<button type="button" class="btn">Edit</button>
<button type="button" class="btn">Delete</button>
</div>
`;
});
};
I’ve tried deleting the ( ; ) at the end of every line, leaving everything in one line, not using the {} of the callback functions but no luck, no luck at all.
I don’t think this is due to some error in the code since this is already passing code of a previous step.
Help please, thanks