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