Tell us whatβs happening:
It seems like my code contains all the rules of the task, but for some reason the tester does not let me go to the next lesson.
Your code so far
// Only change code below this line
function urlSlug(title) {
return title.toLowerCase().trim().split(/\W/).join("-");
}
console.log(urlSlug(" Winter Is coming"));
// Only change code above this line
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36
.
Challenge: Apply Functional Programming to Convert Strings to URL Slugs
Link to the challenge: