Tell us what’s happening:
Hi guys,
I can’t figure out what is it that I wrote wrong in this replace method of str. Could anyone please assist me?
Your code so far
<!-- file: index.html -->
const calorieCounter = document.getElementById(‘calorie-counter’);
const budgetNumberInput = document.getElementById(‘budget’);
const entryDropdown = document.getElementById(‘entry-dropdown’);
const addEntryButton = document.getElementById(‘add-entry’);
const clearButton = document.getElementById(‘clear’);
const output = document.getElementById(‘output’);
let isError = false;
function cleanInputString(str) {
const regex = /[±\s]/g;
“±\s”.replace(/±\s/g, “”);
}
### Your browser information:
User Agent is: <code>Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0</code>
### Challenge Information:
Learn Form Validation by Building a Calorie Counter - Step 24
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-form-validation-by-building-a-calorie-counter/step-24