Learn localStorage by building a todo app step 68

const taskObj = {
id: `${titleInput.value.toLowerCase().split(" ").join("-")}-${Date.now()}`,
    title: titleInput.value,
    date: dateInput.value,
    description: descriptionInput.value,
  };

where do I put the remove special chars in the code ? . I am struggling very bad and I need help

The titleInput.value and the descriptionInput.value properties should be passed as an argument to the removeSpecialChars function.

const obj = {
  someProp: someFn(element.value)
}

In the future.

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Help button located on the challenge. This button only appears if you have tried to submit an answer at least three times.

The Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

1 Like

the id shows `${titleInput.value.toLowercase().split(β€œβ€).join(β€œ-”)}-${Date.now()}’ . Using your example do I put the remove Special Chars before the id ? .

Not sure what you mean by before the id.

The function should β€œwrap” the properties mentioned. If you see titleInput.value it should be someFn(titleInput.value) and the same for the other property (obviously someFn is just an example function name, you should use removeSpecialChars)


Please try and use the function and post your code so we can see how you are using it.

1 Like