Tell us what’s happening:
I am stuck on Step 24: Use your regex to replace all instances of +, -, and a space in str with an empty string. Return this value.
I have done that in my .js code and yet I get the error message “You should pass regex as the first argument to replace”. I need help! Thanks!
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
return str.replace(/[+\-\s]/g, '');
// 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/151.0.0.0 Safari/537.36 Edg/151.0.0.0
Challenge Information:
Build an Envelope Budget App - Step 24