This is also correct but not working

Your code so far

let hello = "   Hello, World!  ";
let wsRegex = /\w+\W+/g; // Change this line
let result = hello.match(wsRegex).join(""); // Change this line

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36.

Challenge: Remove Whitespace from Start and End

Link to the challenge:

Close, but not quite:

// ***Hello, World!  ***

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.