\s : means "one space"
\s+ : means "one or more spaces"
let stringWithSpace = ' A B C D EF ';
console.log(str.replace(/\s/g, '#'));
// ##A#B##C###D#EF# => means one space replace by one #;
console.log(str.replace(/\s+/g, '#'));
// #A#B#C#D#EF# => means one or more spaces, all replace by #;


![[Html] 關於<meta>的大小事](https://static.coderbridge.com/images/covers/default-post-cover-3.jpg)