JavaScript Getting Started With ES2015 Create Functions Using Arrow Syntax Review JavaScript Arrow Functions

Fernando Jimenez
Fernando Jimenez
Pro Student 7,209 Points

why is my answer wrong?

const remove = (string , letter) => { let regex = new RegExp(letter, 'g'); return string.replace(regex,''); }

Sting and letter are the two parameters that are supposed to be on this arrow function, why is it wrong then?

1 Answer

Steven Parker
Steven Parker
201,295 Points

Apparently, it does not like the space in front of the comma!

Since in a practical situation that would not be a problem, you might want to report this as a bug to the Support folks.