Tell us what’s happening:
function cleanInputString(str) {
const regex=str.replace(regex/[±" "]/g, “”);
return regex;
}
I have tried this but still it says, ‘You should pass “” as the second argument for replace’
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
function cleanInputString(str) {
const regex=str.replace(regex/[+-" "]/g, "");
return regex;
}
// 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/127.0.0.0 Safari/537.36
Challenge Information:
Learn Form Validation by Building a Calorie Counter - Step 24