Tell us what’s happening:
I dont know what might be wrong. Help please.
I’ve tried every syntax I can think of, but still doesn’t pass
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
function cleanInputString(str) {
const regex = /[+-\s]/g;
const a = str.replace(regex, "");
return a;
}
// 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/126.0.0.0 Safari/537.36
Challenge Information:
Learn Form Validation by Building a Calorie Counter - Step 24