Learn localStorage by Building a Todo App - Step 67

Tell us what’s happening:

Learn Localstorage by Building a Todo App Step 67 - I have tried every combination of code possible and even those on the forum and others online that pass with “congratulations your code passes”, and yet I keep getting the “sorry”, your code does not pass". Can anybody advise on what the underlying problem may be or any known glitch in the system?

const removeSpecialChars = (string) => {
return string.replace(/[^A-Za-z0-9\s]/g, “”);
}

THe console says: 1. Define a removeSpecialChars function, 2. removeSpecialChars should not remove spaces, 3. removeSpecialChars should not remove single quotes, 4. removeSpecialChars should remove double quotes, 5. removeSpecialChars should remove underscores.

Your code so far

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

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

const removeSpecialChars = (string) => {
  return string.replace(/[^A-Za-z0-9\s]/,"")
}

// User Editable Region
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Challenge Information:

Learn localStorage by Building a Todo App - Step 67

if you have also this, check that you don’t have syntax errors, or copy this part, reset the step and put it back in again

i did it like this it work
code removed by moderator

hi @alimohsini734

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.