Explaination for JS CodeWar code = replace (/(.) /g, )

Viewed 15

I completed this code was a different way. I'm on level 7/8 Kyu and still learning. I came across some code that has a great clever rating but I have no understanding of what it means. I'm familiar with the replace method and what /g means, but I'm rather lost with the rest of the code. Below is the problem. I was able to solve it but I can't find an answer to my question.

CodeWars code in question

0 Answers
Related