Javascript – How to remove whitespace of a substring
I am working on a functional programming exercise and I was asked to replace all whitespaces in the string with an hyphen. If I have a string like This is a title, the output should be this-is-a-title. Now, all cases…