Whenever confused, it often helps to break down your function chain into smaller bits and see what they output individually.
Your regex /[_\W\s]/g matches single characters at a time, so what happens if it meets consecutive matches like ', '?
It makes sense, your regex will split another time between the ',' and the ' ', creating empty strings. Then when you join them back up, it creates extra spaces.
Yes I solved it by adding + at the end of regex. Now the problem I’m finding is that .reverse() only reverses the elements in the .split() array and not the individual strings. Unless I did something like this: