Tell us what’s happening:
I’m not having a problem, but I think this is an unintended solution to the challenge. It passes all the tests but is semantically not what the challenge asks the student to do. I don’t know if the tests should be changed to account for this or if this doesn’t matter at all
Your code so far
let hello = " Hello, World! ";
let wsRegex = /\s{2,}/g; // Change this line
let result = hello.replace(wsRegex, ""); // Change this line
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0
Challenge: Remove Whitespace from Start and End
Link to the challenge: