Learn localStorage by Building a Todo App - Step 66

Tell us what’s happening:

what am i doing wrong here???

id: ${removeSpecialChars(titleInput.value).toLowerCase().split(" ").join("-")}-${Date.now()},
title: removeSpecialChars(titleInput.value.trim()),
date: dateInput.value,
description: removeSpecialChars(descriptionInput.value.trim()),

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

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

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36

Challenge Information:

Learn localStorage by Building a Todo App - Step 66

Hello!
In the title and description when calling removeSpecialChars() you don’t need to use trim(), as this operation is already being done in the function.

1 Like

Thank you very much, it worked :folded_hands: