Hello everyone, i have some question, i was doing a challenge (you’ll find the link below) and i searched for a solution, of course i’ve founded FCC solutions , it worked and all yet i have a problem with it. It’s doesn’t make sense to type :
trim() function removes all the white spaces, which means that the code later won’t match any white space. Which means that split(/+s/) won’t work, because there would be no white spaces anymore, it were removed using trim() function.
The solution worked, yet i am open for an explanation for this.
And thank you
Functional Programming - Apply Functional Programming to Convert Strings to URL Slugs