Learn localStorage by building a todo app step 68

Hi
Could you help me fix my error please,
i dont understand why this error occure

const taskObj = {
id: removeSpecialChars(titleInput.value),
title: removeSpecialChars(titleInput.value),
date: dateInput.value,
description: removeSpecialChars(descriptionInput.value),
};

on my log i have
// running tests 1. You should call

removeSpecialChars

on

titleInput.value

when assigning the

id

. // tests completed

Your taskObj looks good apart from the value of the id key. Notice that the prompt says:

For the id property, only call it on the titleInput.value part of the property value.

The id starts as a big string interpolation that looks like this:

id: `${titleInput.value.toLowerCase().split(" ").join("-")}-${Date.now()}`

The prompt is asking you to only use the removeSpecialChars function on titleInput.value in the id, without modifying anything else about the value of id. (As it stands, you fully replaced the value of id with removeSpecialChars(titleInput.value), which will definitely not be what the tests expect lol.)

thanks i’ve fixe it :slight_smile:

1 Like