# Learn localStorage by Building a Todo App - Step 67

**URL:** <https://forum.freecodecamp.org/t/learn-localstorage-by-building-a-todo-app-step-67/724422>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [December 10, 2024, 1:48pm UTC](https://forum.freecodecamp.org/t/learn-localstorage-by-building-a-todo-app-step-67/724422 "2024-12-10T13:48:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![WantToSuccess](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WantToSuccess](https://forum.freecodecamp.org/u/WantToSuccess)\
**Post date:** [December 10, 2024, 1:48pm UTC](https://forum.freecodecamp.org/t/learn-localstorage-by-building-a-todo-app-step-67/724422/1 "2024-12-10T13:48:07Z")

</div>

### Tell us what’s happening:

i don’t know what’s the problem. im confused.  
can someone walkthrough me for what’s the problem with this solution?

### Your code so far

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

```

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

const removeSpecialChars = (e) => {
  return e.trim().replace(/[^A-Za-z0-9\-\s]/g, '')

// User Editable Region

```

```css
/* file: styles.css */

```

### Your browser information:

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) 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  
[https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-localstorage-by-building-a-todo-app/step-67](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-localstorage-by-building-a-todo-app/step-67)

---

<div class="post-metadata">

**Author:** ![hasanzaib1389](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/hasanzaib1389/32/377602_2.png) [@hasanzaib1389](https://forum.freecodecamp.org/u/hasanzaib1389)\
**Post date:** [December 10, 2024, 1:53pm UTC](https://forum.freecodecamp.org/t/learn-localstorage-by-building-a-todo-app-step-67/724422/2 "2024-12-10T13:53:22Z")

</div>

> [@WantToSuccess](#):
>
> ```auto
> const removeSpecialChars = (e) => {
> return e.trim().replace(/[^A-Za-z0-9\-\s]/g, '')
> 
> //
> 
> ```

Hi there!

You have missing a closing curly brace for the function’s body. Also don’t trim the returning statement

---

<div class="post-metadata">

**Author:** ![WantToSuccess](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WantToSuccess](https://forum.freecodecamp.org/u/WantToSuccess)\
**Post date:** [December 10, 2024, 2:18pm UTC](https://forum.freecodecamp.org/t/learn-localstorage-by-building-a-todo-app-step-67/724422/3 "2024-12-10T14:18:18Z")

</div>

const removeSpecialChars = (e) =\> {  
return e.replace(/[^A-Za-z0-9-\s]/g , ‘’) }

still not works…

---

<div class="post-metadata">

**Author:** ![hasanzaib1389](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/hasanzaib1389/32/377602_2.png) [@hasanzaib1389](https://forum.freecodecamp.org/u/hasanzaib1389)\
**Post date:** [December 10, 2024, 2:22pm UTC](https://forum.freecodecamp.org/t/learn-localstorage-by-building-a-todo-app-step-67/724422/4 "2024-12-10T14:22:08Z")

</div>

> [@WantToSuccess](#):
>
> e.replace(/[^A-Za-z0-9-\s]/g

Remove th `-` after `9` within the regular expression.

---

<div class="post-metadata">

**Author:** ![WantToSuccess](https://avatars.discourse-cdn.com/v4/letter/w/7ba0ec/32.png) [@WantToSuccess](https://forum.freecodecamp.org/u/WantToSuccess)\
**Post date:** [December 11, 2024, 5:47am UTC](https://forum.freecodecamp.org/t/learn-localstorage-by-building-a-todo-app-step-67/724422/5 "2024-12-11T05:47:55Z")

</div>

Thank you for the reply.  
it still doesn’t work and i’ll just move on.  
this is my final code looks like

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

---

<div class="post-metadata">

**Author:** ![hasanzaib1389](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/hasanzaib1389/32/377602_2.png) [@hasanzaib1389](https://forum.freecodecamp.org/u/hasanzaib1389)\
**Post date:** [December 11, 2024, 6:00am UTC](https://forum.freecodecamp.org/t/learn-localstorage-by-building-a-todo-app-step-67/724422/6 "2024-12-11T06:00:42Z")

</div>

> [@WantToSuccess](#):
>
> const removeSpecialChars = (e) =\> {  
> return e.replace(/[^A-Za-z0-9\s]/g,“”)  
> }

The above code is passing for me. But remember don’t copy and paste that to the challenge editor.  
Because it’s empty string `“”` have altered here by posting your code here without preformatted it. Make sure the string `""` or `''`

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [June 11, 2025, 6:01pm UTC](https://forum.freecodecamp.org/t/learn-localstorage-by-building-a-todo-app-step-67/724422/7 "2025-06-11T18:01:35Z")

</div>

Closed on June 11, 2025, 6:01pm UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
